0% found this document useful (0 votes)
35 views5 pages

Memory Management Techniques

The document discusses memory management techniques, categorizing them into contiguous and non-contiguous schemes. Contiguous schemes include single contiguous and multiple partitioning (fixed and dynamic), while non-contiguous schemes involve paging and segmentation. Each technique has its advantages and disadvantages, impacting memory efficiency and process management.

Uploaded by

japneet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views5 pages

Memory Management Techniques

The document discusses memory management techniques, categorizing them into contiguous and non-contiguous schemes. Contiguous schemes include single contiguous and multiple partitioning (fixed and dynamic), while non-contiguous schemes involve paging and segmentation. Each technique has its advantages and disadvantages, impacting memory efficiency and process management.

Uploaded by

japneet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Memory Management Techniques:

The memory management techniques can be classified into


following main categories:

o Contiguous memory management schemes


o Non-Contiguous memory management schemes

Contiguous memory management schemes:


In a Contiguous memory management scheme, each program occupies a
single contiguous block of storage locations, i.e., a set of memory locations
with consecutive addresses.

Single contiguous memory management schemes:

The Single contiguous memory management scheme is the simplest memory


management scheme used in the earliest generation of computer systems.
In this scheme, the main memory is divided into two contiguous areas or
partitions. The operating systems reside permanently in one partition,
generally at the lower memory, and the user process is loaded into the other
partition.

Advantages of Single contiguous memory management schemes:


o Simple to implement.
o Easy to manage and design.
o In a Single contiguous memory management scheme, once a process
is loaded, it is given full processor's time, and no other processor will
interrupt it.

Disadvantages of Single contiguous memory management schemes:

o Wastage of memory space due to unused memory as the process is


unlikely to use all the available memory space.
o The CPU remains idle, waiting for the disk to load the binary image into
the main memory.
o It can not be executed if the program is too large to fit the entire
available main memory space.
o It does not support multiprogramming, i.e., it cannot handle multiple
programs simultaneously.

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.

The multiple partitioning schemes can be of two types:

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.

Advantages of Fixed Partitioning memory management schemes:

o Simple to implement.
o Easy to manage and design.

Disadvantages of Fixed Partitioning memory management schemes:

o This scheme suffers from internal fragmentation.


o The number of partitions is specified at the time of system generation.

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.

Disadvantages of Dynamic Partitioning memory management


schemes:

o This scheme also suffers from internal fragmentation.


o The number of partitions is specified at the time of system
segmentation.

Non-Contiguous memory management schemes:


In a Non-Contiguous memory management scheme, the program is divided
into different blocks and loaded at different portions of the memory that
need not necessarily be adjacent to one another. This scheme can be
classified depending upon the size of blocks and whether the blocks reside in
the main memory or not.

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:

o Pages reduce external fragmentation.


o Simple to implement.
o Memory efficient.
o Due to the equal size of frames, swapping becomes very easy.
o It is used for faster access of data.

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.

You might also like