CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ

A file system uses 4 KB blocks. A file of 10,001 bytes is stored. How much space is lost to internal fragmentation in its last block?

  1. A. 2,287 bytes
  2. B. 1,807 bytes
  3. C. 0 bytes
  4. D. 4,095 bytes

Correct answer: A. 2,287 bytes

10,001 bytes need ⌈10,001 / 4096⌉ = 3 blocks = 12,288 bytes, so 12,288 − 10,001 = 2,287 bytes are wasted. Using 1000-byte kilobytes gives the wrong figure 1,999.

More Operating Systems questions

Exams that ask this topic