Memory Management Techniques
Memory Management Techniques
Multiple Partitioning:
The single Contiguous memory management scheme is inefficient as it limits
computers to execute only one program at a time resulting in wastage in
memory space and CPU time. The problem of inefficient CPU use can be
overcome using multiprogramming that allows more than one program to
run concurrently. To switch between two processes, the operating systems
need to load both processes into the main memory. The operating system
needs to divide the available main memory into multiple parts to load
multiple processes into the main memory. Thus multiple processes can
reside in the main memory simultaneously.
o Fixed Partitioning
o Dynamic Partitioning
Fixed Partitioning
The main memory is divided into several fixed-sized partitions in a fixed
partition memory management scheme or static partitioning. These
partitions can be of the same size or different sizes. Each partition can hold a
single process. The number of partitions determines the degree of
multiprogramming, i.e., the maximum number of processes in memory.
These partitions are made at the time of system generation and remain fixed
after that.
o Simple to implement.
o Easy to manage and design.
Dynamic Partitioning
The dynamic partitioning was designed to overcome the problems of a fixed
partitioning scheme. In a dynamic partitioning scheme, each process
occupies only as much memory as they require when loaded for processing.
Requested processes are allocated memory until the entire physical memory
is exhausted or the remaining space is insufficient to hold the requesting
process. In this scheme the partitions used are of variable size, and the
number of partitions is not defined at the system generation time. Dynamic
partitioning tries to overcome the problems caused by fixed partitioning. In
this technique, the partition size is not declared initially. It is declared at the
time of process loading.
The first partition is reserved for the operating system. The remaining space
is divided into parts. The size of each partition will be equal to the size of the
process. The partition size varies according to the need of the process so
that the internal fragmentation can be avoided.
Advantages of Dynamic Partitioning memory management schemes:
o Simple to implement.
o Easy to manage and design.
What is paging?
Paging is a technique that eliminates the requirements of contiguous
allocation of main memory. In this, the main memory is divided into fixed-
size blocks of physical memory called frames. The size of a frame should be
kept the same as that of a page to maximize the main memory and avoid
external fragmentation.
Advantages of paging:
What is Segmentation?
Segmentation is a technique that eliminates the requirements of contiguous
allocation of main memory. In this, the main memory is divided into variable-
size blocks of physical memory called segments. It is based on the way the
programmer follows to structure their programs. With segmented memory
allocation, each job is divided into several segments of different sizes, one
for each module. Functions, subroutines, stack, array, etc., are examples of
such modules.