Related Articles
Aptitude | GATE CS 1998 | Question 64
• Difficulty Level : Expert
• Last Updated : 17 Nov, 2017

In a computer system where the ‘best-fit’ algorithm is used for allocating ‘jobs’ to ‘memory partitions’, the following situation was encountered:

When will the 20K job complete?

Note – This question was subjective type.
(A) 8
(B) 18
(C) 11
(D) None of these

Explanation: Partitions are 4k , 8k, 20k, 2k, now due to best fit allocation algorithm.

Best fit algo allocates the process to a partition which is the smallest sufficient partition among the free available partitions
now come to the question first 2k come and fit into the partition of 2k and run (4 unit) and then come 14k and fit into the partition of 20k and run(10 unit ) and next process come of size 3k and fit into the portion 4k and run (2 unit) and now next process 6k come and fit to the 8k partition and run(1 unit ) now next process is 10k and fit into portion20k run for (1 unit) and finally 20k come and fit into 20k portion and run for (8 unit)

So total completion time for 20k job = (10+1+8) = 19 unit answer.

This explanation is contributed by ajay0007.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :