CS FundamentalsHardGATE CS

A 1 MB region uses the buddy system. Requests arrive for A = 70 KB, B = 35 KB and C = 80 KB. What is the total internal fragmentation, and what is the largest free block afterwards?

  1. A. 135 KB, and the largest free block is 704 KB
  2. B. 320 KB, and the largest free block is 512 KB
  3. C. 135 KB, and the largest free block is 512 KB
  4. D. 135 KB, and the largest free block is 256 KB

Correct answer: C. 135 KB, and the largest free block is 512 KB

A gets 128 KB, B 64 KB and C 128 KB: waste 58 + 29 + 48 = 135 KB. Allocation splits only the lower 512 KB (A at 0, B at 128, C at 256), leaving free 64, 128 and the untouched 512 KB half. 704 KB is the total free space, which is not contiguous; 320 KB is the allocated space.

More Operating Systems questions

Exams that ask this topic