SEGMENTATION(1)
SEGMENTATION(1)
Virtual Memory
Segmentation
Simple Memory
Segmentation
VIRTUAL MEMORY
SEGMENTATION
It divides the process into a
number of segments. All the
segments are not divided at a
time. Virtual memory
segmentation may or may not
take place at the run time of a
program.
SIMPLE MEMORY SEGMENTATION
Each process is divided
into a number of
segmentation, all of which
are loaded into memory at
run time, through not
necessarily contiguously.
Segment table
A table stores the information about all
such segment and is called segment table.
It maps two-dimensional logical address
into one-dimensional physical address .
Its each table entry has :
Base address: It contains the starting
physical address where the segment
reside in memory.
Limit : It specifies the length of the
segment.
Advantages of segmentation
No internal fragmentation.
Flexibility: Segmentation provides a higher
degree of flexibility than paging. Segments
can be of variable size, and processes can be
designed to have multiple segments.
Sharing : segmentation allows for sharing of
memory segments between processes. This
can be useful for inter-process
communication or for sharing code libraries.
As a complete module is loaded all at once,
segmentation improves CPU utilization.
Disadvantage of segmentation
As processes are loaded and removed from the
memory, the free memory space is broken into
little pieces ,causing External Fragmentation.
Overhead: The use of a segment table can
increase overhead and reduce performance.
Each segment table entry requires additional
memory.
Due to the need for two memory accesses, one
for the segment table and the other for main
memory, access time to retrieve the instruction
increases.