Fragmentation in Contiguous Allocation
What you'll learn: You'll understand how external fragmentation wastes memory by scattering free space into unusable small chunks.
The Problem with Scattered Free Space
When using contiguous memory allocation, processes are loaded into continuous blocks of memory. As processes arrive and terminate over time, memory becomes a patchwork of occupied and free regions. External fragmentation occurs when you have enough total free memory to satisfy a request, but it's broken up into non-contiguous pieces too small individually to be useful.
The Bookshelf Analogy
Imagine a bookshelf where books (processes) must sit side-by-side without gaps. You add and remove books over time. Eventually, you might have three empty spaces: one slot wide, two slots wide, and one slot wide again—totaling four empty slots. But when you need to shelve a three-slot-wide book, you can't! The total space exists, but it's fragmented into unusable chunks.
Why It Matters
External fragmentation is insidious because:
- Memory is wasted despite being technically "free"
- Process requests fail even when aggregate free space is sufficient
- The problem worsens over time as more processes come and go
- It reduces effective memory utilization, sometimes dramatically
For example, if you have three free holes of 50KB, 30KB, and 20KB (100KB total), but need to load a 60KB process, the allocation fails—those scattered chunks can't be combined under contiguous allocation.
The "50-Percent Rule"
Research shows that statistical analysis suggests up to one-third of memory can be lost to external fragmentation in typical workloads with contiguous allocation strategies.
Key Takeaway: External fragmentation occurs when free memory exists but is scattered in small, non-contiguous chunks that cannot satisfy larger allocation requests, wasting potentially significant amounts of memory over time.