Bird
Raised Fist0

A file system inode uses 12 direct pointers and one single indirect pointer. If a file size requires accessing the 300th data block, which pointer type will be used and why?

medium🧠🧾 Concept Trace Q4 of Q15
Operating Systems - Inode Structure - File Metadata & Block Pointers
A file system inode uses 12 direct pointers and one single indirect pointer. If a file size requires accessing the 300th data block, which pointer type will be used and why?
AThe 300th block is accessed via the single indirect pointer because it covers all blocks beyond direct pointers
BThe 300th block is accessed via the double indirect pointer because single indirect cannot cover that many blocks
CThe 300th block is accessed via the triple indirect pointer because it handles very large files
DThe 300th block is accessed via the 12th direct pointer since direct pointers cover all blocks
Step-by-Step Solution
Solution:
  1. Step 1: Calculate single indirect pointer coverage

    Single indirect pointer points to a block containing multiple pointers. Assuming block size allows 256 pointers, single indirect covers blocks 13 to 268 (12 direct + 256).
  2. Step 2: Locate block 300

    Block 300 is beyond single indirect coverage, so next level pointer is double indirect.
  3. Step 3: Confirm pointer type

    Double indirect pointer points to blocks of pointers to data blocks, covering blocks beyond single indirect.
  4. Final Answer:

    Option B -> Option B
  5. Quick Check:

    Block 300 > 268, so double indirect pointer is used [OK]
Quick Trick: Single indirect covers limited blocks; double indirect covers more [OK]
Common Mistakes:
MISTAKES
  • Assuming single indirect covers all beyond direct pointers
Trap Explanation:
PITFALL
  • Candidates often overestimate single indirect pointer coverage or forget multi-level indirection.
Interviewer Note:
CONTEXT
  • Evaluates understanding of pointer coverage ranges and multi-level indirection.
Master "Inode Structure - File Metadata & Block Pointers" in Operating Systems

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Operating Systems Quizzes