CS FundamentalsHardGATE CS

An 8 MB file uses linked indexed allocation: each 4 KB index block holds 1024 four-byte pointers, of which the last is reserved as the link to the next index block. Data blocks are 4 KB. How many index blocks are needed?

  1. A. 2
  2. B. 3
  3. C. 1
  4. D. 4

Correct answer: B. 3

The file has 8 MB / 4 KB = 2048 data blocks. Each index block lists only 1023 data pointers (one slot is the link), so 2048 / 1023 rounds up to 3 index blocks. Forgetting the link slot gives 2.

More Operating Systems questions

Exams that ask this topic