A computer has 1000 K of main memory. The jobs arrive and finish in the…
2018
A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?
- A.
First fit
- B.
Best fit
- C.
Both perform the same
- D.
None of the above
Attempted by 93 students.
Show answer & explanation
Correct answer: A
First Fit successfully allocates all jobs in the sequence, whereas Best Fit fails to allocate Job 6. With First Fit, Job 4 occupies the hole left by Job 1 (200K), leaving an 80K fragment that accommodates Job 6. Best Fit places Job 4 in the smallest sufficient hole (150K), fragmenting memory into unusable pieces for Job 6. Thus, First Fit performs better for this specific sequence of arrivals and finishes.
A video solution is available for this question — log in and enroll to watch it.