CS FundamentalsEasyGATE CS

A Unix-style inode has 10 direct pointers and one single, one double and one triple indirect pointer. Blocks are 2 KB and pointers are 4 bytes. The inode is in memory and nothing else is cached. How many disk block reads are needed to read the byte at file offset 600 000 000?

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

Correct answer: B. 4

Block index = 600 000 000/2048 = 292 968. Direct, single and double indirect cover 10+512+262 144 = 262 666 blocks, so the block is reached through the triple indirect pointer: 3 pointer blocks plus the data block = 4 reads.

More Operating Systems questions

Exams that ask this topic