Bird
Raised Fist0

After compaction, what is the state of fragmentation and allocation possibility?

medium🧾 Trace Q4 of Q15
Operating Systems - Internal vs External Fragmentation - Compaction & Buddy System
A memory system has free blocks of 3KB, 4KB, and 8KB scattered, totaling 15KB. A 10KB request fails due to fragmentation. After compaction, what is the state of fragmentation and allocation possibility?
AFree memory is unchanged; 10KB allocation succeeds by splitting existing blocks; internal fragmentation remains
BFree blocks remain scattered; 10KB allocation still fails; internal fragmentation increases
CFree memory is split into smaller blocks; 10KB allocation partially succeeds; external fragmentation worsens
DFree memory is consolidated into one 15KB block; 10KB allocation succeeds; no external fragmentation remains
Step-by-Step Solution
Solution:
  1. Step 1: Identify fragmentation type

    Scattered free blocks cause external fragmentation preventing 10KB allocation.
  2. Step 2: Effect of compaction

    Compaction moves allocated blocks to consolidate free memory into a single 15KB block.
  3. Step 3: Allocation after compaction

    With a contiguous 15KB block, 10KB allocation succeeds and external fragmentation is eliminated.
  4. Final Answer:

    Option D -> Option D
  5. Quick Check:

    Compaction consolidates free space enabling large allocations [OK]
Quick Trick: Compaction merges scattered free blocks into one contiguous block [OK]
Common Mistakes:
MISTAKES
  • Assuming compaction does not affect fragmentation
  • Confusing internal and external fragmentation effects
  • Believing allocation can succeed without contiguous space
Trap Explanation:
PITFALL
  • Some options confuse fragmentation types or effects of compaction on allocation.
Interviewer Note:
CONTEXT
  • Tests understanding of compaction impact on fragmentation and allocation.
Master "Internal vs External Fragmentation - Compaction & Buddy System" 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