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.
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.
When it occurs?
When portions of allocated memory are too small to hold any process.
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.
- Memory Management Introduction
- Partition Allocation Method
- Buddy- System Allocator
- Types of Paging
- Mapping Virtual address to Physical Address.
- Virtual Memory
- Demand Paging
- Implementation of Demand paging and page fault
- Page Replacement Algorithms
- Belady’s Anomaly
- Static vs Dynamic Loading
- Static vs Dynamic Linking
- Translational Look Aside Buffer
- Process Address Space
- Difference between Segmentation and Paging