Bird
Raised Fist0

If a file system using contiguous allocation frequently suffers from external fragmentation, which follow-up strategy would best mitigate this issue without sacrificing access speed?

hard🎤 Interviewer Follow-up Q10 of Q15
Operating Systems - File Allocation Methods - Contiguous, Linked, Indexed
If a file system using contiguous allocation frequently suffers from external fragmentation, which follow-up strategy would best mitigate this issue without sacrificing access speed?
AImplement periodic compaction to rearrange files and consolidate free space.
BSwitch to linked allocation to eliminate external fragmentation entirely.
CUse indexed allocation with multi-level indexing to avoid fragmentation.
DIncrease block size to reduce the number of fragments.
Step-by-Step Solution
Solution:
  1. Step 1: Understand external fragmentation in contiguous allocation

    Files stored contiguously cause free space to fragment over time.
  2. Step 2: Evaluate compaction

    Periodic compaction rearranges files to consolidate free space, reducing fragmentation.
  3. Step 3: Assess alternatives

    Switching to linked or indexed sacrifices access speed; increasing block size reduces fragmentation but wastes space.
  4. Step 4: Choose best trade-off

    Compaction maintains contiguous allocation benefits while mitigating fragmentation.
  5. Final Answer:

    Option A -> Option A
  6. Quick Check:

    Compaction reduces fragmentation without losing contiguous access speed [OK]
Quick Trick: Compaction fixes fragmentation while preserving contiguous speed [OK]
Common Mistakes:
MISTAKES
  • Assuming switching allocation methods is simplest fix
  • Believing increasing block size solves fragmentation fully
  • Ignoring overhead of compaction
Trap Explanation:
PITFALL
  • Candidates often pick method switches ignoring access speed trade-offs and overhead.
Interviewer Note:
CONTEXT
  • Probes understanding of fragmentation management and trade-offs in file systems.
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