Difference Between Contiguous and Non-contiguous Memory Allocation

MemoryComputersFile System

In this post, we will understand the difference between contiguous and non-contiguous memory allocation −

Contiguous Memory Allocation

  • In this allocation type, the consecutive blocks of memory is allocated to a file/process.

  • It executes quickly in comparison to non-contiguous memory.

  • It is easy to be controlled by the operating system.

  • Minimum overhead since there are not many address translation when a process is being executed.

  • There is internal fragmentation in contiguous memory allocation.

  • There are different types of partitions: Single partition allocation and multi-partition allocation.

  • Memory gets wasted.

  • The swapped-in process is arranged in the originally allocated space itself.

Non-contiguous Memory Allocation

  • In this type of allocation, separate blocks of memory are allocated to a file/process.

  • It executes slowly in comparison to contiguous memory.

  • It is difficult to be controlled by the operating system.

  • More overhead since it needs to translate multiple addresses.

  • It includes paging.

  • It includes segmentation.

  • No memory is wasted.

  • External fragmentation occurs in this type of allocation.

  • The swapped-in processes can be arranged in any location in the memory.

Updated on 19-Apr-2021 06:30:11