Internal Fragmentation Vs External Fragmentation

Whenever a process is loaded or removed from the physical memory block, it creates a small hole in memory space which is called fragment. Due to fragmentation, the system fails in allocating the contiguous memory space to a process even though it have the requested amount of memory but, in a non-contiguous manner. The fragmentation is further classified into two categories Internal and External Fragmentation.

Key Differences Between Internal and External fragmentation

  1. The basic reason behind the occurrences of internal and external fragmentation is that internal fragmentation occurs when memory is partitioned into fixed-sized blocks whereas external fragmentation occurs when memory is partitioned into variable size blocks.
  2. When the memory block allotted to the process comes out to be slightly larger than requested memory, then the free space left in the allotted memory block causes internal fragmentation. On the other hands, when the process is removed from the memory it creates free space causing a hole in the memory which is called external fragmentation.
  3. The problem of internal fragmentation can be solved by partitioning the memory into variable sized blocks and assign the best fit block to the requesting process. However, the solution for external fragmentation is compaction, but it is expensive to implement, so the processes must be allowed to acquire physical memory in a non-contiguous manner, to achieve this the technique of paging and segmentation is introduced.

Conclusion:

The problem of internal fragmentation can be reduced, but it can not be totally eliminated. The paging and segmentation help in utilizing the space freed due to external fragmentation by allowing a process to occupy the memory in a non-contiguous manner.

Comments

Popular posts from this blog

Process Vs Thread

Reasoning Vs Inference

Frame vs Packet