Internal Fragmentation vs External Fragmentation

Internal Fragmentation vs External Fragmentation in OS 2 PrepInsta




Internal Vs External Fragmentation

Internal Fragmentation

When a process is assigned to a memory block and if that process is smaller than the memory requested, it creates a free space in the assigned memory block. Then the difference between assigned and requested memory is called the internal fragmentation.

Internal Fragmentation in OS PrepInsta2

External Fragmentation

When the process is loaded or removed from the memory, a free space is created. This free space creates an empty space in the memory which is called external fragmentation.

External Fragmentation in OS PrepInsta

Learn more about internal fragmentation and external fragmentation here.

 Internal FragmentationExternal Fragmentation
When Internal/External Fragmentation takes placeWhen fixed sized memory blocks are assigned to the processes When the memory assigned to the process dynamically based on process request
Why does Internal/External Fragmentation occurMemory is partitioned into fixed-sized blocks.Memory is partitioned into variable size blocks
What is the alternative to overcome Internal/External FragmentationInternal fragmentation can be reduced effectively by dividing the memory into variable sized blocks and assigning the best-fit block to the process requesting for the memory. External fragmentation can be eliminated by compaction, paging, and segmentation so that memory can be allocated in a non-contiguous manner to a process.

In a nutshell, both internal and external fragmentation are natural process related to empty memory space or memory being wasted. However, the problem with both cases cannot be resolved entirely but can be mitigated to some extent with solutions given above.

Fragmentation in Operating System (OS) PrepInsta