CS FundamentalsHardGATE CS

An inode has 12 direct pointers, one single-indirect and one double-indirect pointer; blocks are 4 KB and pointers 8 bytes. What is the maximum file size?

  1. A. 1 GB + 2 MB + 48 KB
  2. B. 4 GB + 4 MB + 48 KB
  3. C. 1 GB + 4 MB + 48 KB
  4. D. 512 MB + 2 MB + 48 KB

Correct answer: A. 1 GB + 2 MB + 48 KB

A 4 KB block holds 512 eight-byte pointers. Direct: 12 × 4 KB = 48 KB; single: 512 × 4 KB = 2 MB; double: 512² × 4 KB = 1 GB. With 4-byte pointers the figures would be 4 MB and 4 GB.

More Operating Systems questions

Exams that ask this topic