Multiple choice

Consider the following data ||| |---|---| |
Job size in KB |
Execution Time in microseconds | |
6 |
3 | |
9 |
4 | |
3 |
1 | |
5 |
2 | |
11 |
9 | |
20 |
6 | |
2 |
1 |

If the best fit algorithm is used for allocating jobs to memory partitions of sizes 4KB, 8KB, 20KB and 3KB, when will the 20KB job complete?

  1. 6 microseconds

  2. 19 microseconds

  3. 25 microseconds

  4. 15 microseconds

  5. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Since it is best fit algorithm, so the first 20KB portion will be occupied by 9KB job, which takes 4 microseconds  and 11Kb job takes 9 microsecond and finally 20Kb job requires 6 microsecond. Total time = 4 + 9 + 6 = 19 microseconds