CS FundamentalsHardGATE CS

A file is stored with linked allocation (each block holds a pointer to the next) and nothing is cached. How many disk reads does it take to read logical block 100 (blocks numbered from 0, directory entry in memory), compared with indexed allocation whose single index block is not in memory?

  1. A. 100 versus 2
  2. B. 101 versus 2
  3. C. 101 versus 1
  4. D. 50 versus 2

Correct answer: B. 101 versus 2

Linked allocation must follow the chain from block 0, reading blocks 0 to 100: 101 reads. Indexed allocation reads the index block and then block 100 directly: 2 reads.

More Operating Systems questions

Exams that ask this topic