CS FundamentalsModerateGATE CS (PYQ pattern)

A 2^40-byte disk uses 4 KB blocks. Free space can be tracked either by a bitmap (1 bit per block) or by a plain list of free block numbers, each stored as a 32-bit integer. Below what percentage of free blocks does the list occupy less space than the bitmap?

  1. A. 3.125%
  2. B. 12.5%
  3. C. 25%
  4. D. 0.39%

Correct answer: A. 3.125%

Blocks = 2^40 / 2^12 = 2^28, so the bitmap is 2^28 bits = 32 MB. The list costs 32 bits per free block; it is smaller when 32F < 2^28, i.e. F < 2^23 blocks = 1/32 = 3.125% of the disk. 12.5% treats an entry as 8 bits, 25% as 4 bits, and 0.39% (1/256) mixes bytes and bits.

More Operating Systems questions

Exams that ask this topic