External Fragmentation

Fragmentation

Whenever a process is loaded or removed from the physical memory block, it creates free spaces in the memory, which are commonly known as fragments. These small fragments in the memory cannot be allocated in a contiguous manner to any process as these spaces are not continuous. Consequently, the memory is wasted and cannot be used by another process. This problem is called fragmentation. 

External Fragmentation

Usually, external fragmentation occurs in the case of dynamic or variable sized partitions. Although total space available in the memory is sufficient to execute the process; however, this memory space is not contiguous, which restricts process execution. 

External Fragmentation

Learn about internal fragmentation and contrast between internal and external fragmentation.

When it occurs?

When portions of allocated memory are too small to hold any process.

Example

The RAM has a total of 10 kb free space , but it is not contiguous, or is fragmented. If a process with 10 kb size wants to loads on the RAM, then it cannot load because space is not contiguously free.  

What is the solution?

The solution for external fragmentation is compaction or shuffle memory  contents. In this techniques all the memory contents of memory are shuffled and all free memory is put together in one large block. In order to make compaction feasible, relocation should be dynamic. Also, external fragmentation can be resolved by paging or segmentation mechanisms, which will allow a process to acquire physical memory in a non-contiguous manner.