CS FundamentalsHardGATE CS

Free holes (in order) are 150, 400, 220, 350 and 500 KB. Requests of 210, 380, 140 and 330 KB arrive in that order. Which placement strategies satisfy all four requests?

  1. A. First fit and best fit, but not worst fit
  2. B. Best fit only
  3. C. All three: first, best and worst fit
  4. D. Worst fit and first fit, but not best fit

Correct answer: A. First fit and best fit, but not worst fit

First fit: 210→400, 380→500, 140→150, 330→350. Best fit: 210→220, 380→400, 140→150, 330→350. Worst fit puts 210 in 500 and 380 in 400, then 140 in 350, leaving 150, 20, 220, 210 and 290: nothing fits 330.

More Operating Systems questions

Exams that ask this topic