CS FundamentalsModerateGATE CS (PYQ pattern)

Under first-fit, the fifty-percent rule says that with N allocated blocks there are about N/2 holes. In a measured system the average hole is only half the size of the average allocated block. What fraction of memory is in holes?

  1. A. 1/3
  2. B. 1/4
  3. C. 1/9
  4. D. 1/5

Correct answer: D. 1/5

Holes take (N/2)(s/2) = Ns/4 and blocks Ns, so the wasted fraction = (Ns/4) / (Ns + Ns/4) = 1/5. With equal sizes the classic answer is (1/2)/(3/2) = 1/3; 1/4 divides by blocks only instead of by total memory.

More Operating Systems questions

Exams that ask this topic