CS FundamentalsVery hardGATE CS

A buddy allocator manages 1024 KB starting at address 0 and always uses the lowest-addressed free block of the needed size. Requests: A = 70 KB, B = 35 KB, C = 80 KB; then A is freed; then D = 60 KB is requested. At which address does D start?

  1. A. 0 KB
  2. B. 128 KB
  3. C. 384 KB
  4. D. 192 KB

Correct answer: D. 192 KB

A gets 128 KB at 0; B needs 64 KB, so the block at 128 splits into 128 (B) and 192 (free); C gets 128 KB at 256. Freeing A cannot merge (its buddy at 128 is split). D needs 64 KB, and the free 64 KB block at 192 is used.

More Operating Systems questions

Exams that ask this topic