External fragmentation

Fragmentation is a problem common to all memory allocation schemes. Lets look at the specific example of processes in the partitioning model. Let's say the whole memory was initially empty, then 12 processes were created, and ran, and 5 of these processes terminated, and were removed from memory.

The memory map now looks like this:

Another process, of size 1000KB wishes to run, but cannot. Although there is enough memory, there is not enough contiguous memory (the needed memory isn't together in one lump. It's all fragmented into lots of little bits. This is known as external fragmentation (we'll look at internal fragmentation later).

One obvious solution is compaction; moving some of the occupied blocks of memory together, leaving one or more larger areas of free space. This is practicable, and occasionally used, but not often. (One of the reasons it is not used, is that moving large blocks of memory around can be quite slow, the other is that it can be difficult to decide how best to move the fewest number of blocks to create the most amount of space.)


last updated 3 March 1998