Bird
Raised Fist0

Suppose a file system uses indexed allocation with a single-level index block. What happens when a file grows beyond the capacity of the index block, and how can this limitation be addressed?

hard🎤 Interviewer Follow-up Q15 of Q15
Operating Systems - File Allocation Methods - Contiguous, Linked, Indexed
Suppose a file system uses indexed allocation with a single-level index block. What happens when a file grows beyond the capacity of the index block, and how can this limitation be addressed?
AThe file cannot grow further; to support larger files, multi-level or combined index schemes must be used
BThe file system automatically converts the file to contiguous allocation to accommodate growth
CThe index block dynamically expands by linking to additional index blocks without performance penalty
DThe file system switches to linked allocation for that file to handle the extra blocks
Step-by-Step Solution
  1. Step 1: Understand single-level index block capacity

    A single-level index block can only hold pointers to a fixed number of blocks.
  2. Step 2: What if file grows beyond index block capacity?

    The single index block cannot hold more pointers, so the file cannot grow further under this scheme.
  3. Step 3: Analyze the file cannot grow further; to support larger files, multi-level or combined index schemes must be used

    Correct: multi-level or combined index schemes (e.g., multi-level indexing, inode structures) are used to support larger files.
  4. Step 4: Analyze the file system automatically converts the file to contiguous allocation to accommodate growth

    File systems do not convert allocation methods automatically; contiguous allocation is inflexible for growth.
  5. Step 5: Analyze the index block dynamically expands by linking to additional index blocks without performance penalty

    Index blocks do not dynamically expand by linking; multi-level indexing is a designed solution.
  6. Step 6: Analyze the file system switches to linked allocation for that file to handle the extra blocks

    File systems do not switch allocation methods on the fly; allocation method is fixed per file.
  7. Final Answer:

    Option A -> Option A
  8. Quick Check:

    Single-level index block limits file size; multi-level indexing needed for large files.
Quick Trick: Single-level index block -> fixed max file size; multi-level indexing needed [OK]
Common Mistakes:
MISTAKES
  • Believing index blocks can dynamically expand
  • Thinking allocation methods switch automatically
  • Assuming contiguous allocation can handle dynamic growth easily
Trap Explanation:
PITFALL
  • Options B, C, and D reflect misunderstandings about file system flexibility and index block limitations.
Interviewer Note:
CONTEXT
  • Tests deep understanding of indexed allocation limits and file system design extensions.
Master "File Allocation Methods - Contiguous, Linked, Indexed" 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