Bird
Raised Fist0

You need to store a large file that will be frequently appended to and occasionally read randomly. Which allocation method fits best?

easy🔍 Pattern Recognition Q2 of Q15
Operating Systems - File Allocation Methods - Contiguous, Linked, Indexed
You need to store a large file that will be frequently appended to and occasionally read randomly. Which allocation method fits best?
AContiguous allocation, because it guarantees fast random access.
BIndexed allocation, because it supports efficient random access and dynamic growth.
CLinked allocation, because it allows easy appending without fragmentation.
DSequential allocation, because it optimizes for append-only writes.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze append and random access needs

    Appending requires dynamic block addition; random access requires direct block lookup.
  2. Step 2: Evaluate contiguous allocation

    Contiguous is poor for appending due to fixed block size and fragmentation risk.
  3. Step 3: Evaluate linked allocation

    Linked allows appending but random access is slow due to pointer traversal.
  4. Step 4: Evaluate indexed allocation

    Indexed supports dynamic growth and direct block access via index, balancing both needs.
  5. Final Answer:

    Option B -> Option B
  6. Quick Check:

    Indexed allocation supports random access and appending -> best fit [OK]
Quick Trick: Indexed = dynamic growth + random access [OK]
Common Mistakes:
MISTAKES
  • Assuming contiguous can easily grow files
  • Overestimating linked allocation's random access speed
  • Confusing sequential with contiguous allocation
Trap Explanation:
PITFALL
  • Candidates often pick linked allocation for appending but ignore its poor random access performance.
Interviewer Note:
CONTEXT
  • Checks understanding of allocation trade-offs for mixed access patterns.
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