Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | Gate IT 2007 | Question 11

  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021

Let a memory have four free blocks of sizes 4k, 8k, 20k, 2k. These blocks are allocated following the best-fit strategy. The allocation requests are stored in a queue as shown below.

2007_11

The time at which the request for J7 will be completed will be
(A) 16
(B) 19
(C) 20
(D) 37


Answer: (B)

Explanation: Initially when a process arrives and needs memory, it would search for a hole big enough to fit the job and if the hole is larger then the remaining hole is returned to the free storage list.

Memory BlockSizeJob (t=0)Job(t=8)Job(t=10)Job(t=11)
14kJ3 – 2 units (1K free left)   
28kJ4 – 8 units (2K free left)J5 – 14 unitsJ5 – 14 unitsJ5 – 14 units
320kJ2 -10 units(6K free left)J2 -10 unitsJ6 – 11 unitsJ7 – 19 units
42kJ1 -4 units   

Therefore, the process finishes at J7=19 units

Option B

 

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!