
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Contiguous and Non-Contiguous Memory Allocation
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.