Difference Between Internal and External fragmentation

In this post, we will understand the difference between internal and external fragmentation −

Internal Fragmentation

  • The difference between the memory allocated and the space required is known as internal fragmentation.

  • In this fragmentation, fixed-sized memory blocks are used to process data.

  • This process occurs when a method or process is larger than the required memory.

  • The method used in internal fragmentation is ‘best-fit’ block.

  • It occurs when the memory is divided into fixed sized partitions.

External Fragmentation

  • The unused spaces that is formed between fragments of non-contiguous memory, which are too small to help with a new process, is known as external fragmentation.

  • It uses variable-sized memory blocks to process data.

  • This type of fragmentation occurs when a method or process is removed.

  • It can be used with compaction, paging and segmentation.

  • External fragmentation occurs when memory is divided into variable sized partitions (that is based on size of process).