External Fragmentation occurs when free memory is broken into small, noncontiguous holes between allocated blocks. Even if the total amount of free memory is sufficient to satisfy a request, none of the individual holes is large enough, so the allocation fails.


1. How It Happens

  1. Fixed-size partitions (or variable-sized allocations) are handed out to processes as they arrive.
  2. When a process terminates (or releases memory), its block becomes a free hole.
  3. Over time, as processes of different sizes are loaded and removed, these holes become scattered.
  4. A new process requiring a contiguous chunk larger than any single hole can’t be placed, even if the sum of holes is adequate.

2. Example

Suppose we have 1 000 KB of RAM, and we allocate and free blocks in this sequence:

Step Action Memory Layout (A=Allocated, F=Free)
1 Start: all free [F:1000]
2 Allocate P₁ = 100 KB [A₁:100][F:900]
3 Allocate P₂ = 300 KB [A₁:100][A₂:300][F:600]
4 Allocate P₃ = 200 KB [A₁:100][A₂:300][A₃:200][F:400]
5 Free P₂ [A₁:100][F:300][A₃:200][F:400]
6 Allocate P₄ = 250 KB (fits in first hole) [A₁:100][A₄:250][A₃:200][F:150][F:400]
7 Free P₁ [F:100][A₄:250][A₃:200][F:150][F:400]
8 Request P₅ = 350 KB Cannot allocate! No single free chunk ≥ 350 KB, despite total free = 100 + 150 + 400 = 650 KB.

At step 8, external fragmentation prevents fulfilling P₅’s request because the largest contiguous hole is only 400 KB, and after placing P₄ and P₃ there’s a 400 KB hole—but if P₅ were, say, 450 KB, even though 650 KB is free in total, no single chunk is large enough.


3. Mitigation Techniques


Key Point: External fragmentation is fragmentation between allocations due to dynamic allocation/deallocation, leading to unusable scattered free space.