CS FundamentalsHardWipro · Cognizant pattern

Memory holes, in order, are 150 KB, 450 KB, 250 KB, 350 KB and 500 KB. Requests arrive in order: 240 KB, 410 KB, 130 KB, 380 KB. Which placement strategy satisfies ALL four requests?

  1. A. First fit only
  2. B. Worst fit only
  3. C. Best fit only
  4. D. First fit and worst fit

Correct answer: C. Best fit only

First fit: 240→450, 410→500, 130→150, then 380 finds no hole ≥ 380 (largest is 350). Worst fit: 240→500, 410→450, 130→350, then 380 fails. Best fit: 240→250, 410→450, 130→150, 380→500, so all fit.

More Operating Systems questions

Exams that ask this topic