of the base and offset in the case of pure segmentation
will result in a
physical address in the main memory. If a segment is uploaded to a disk,
trying to access it causes it to be loaded from the disk into the main
memory. As a result, each segment corresponds
to a contiguous block of
memory of the same length, located in an arbitrary location of physical
memory or on a disk. Here are the benefits of memory segmentation.
❖
There is an opportunity to organize several independent segments
of memory for the process and use them to store data of different
nature. However, the access rights to
each such segment can be set
differently
❖
Individual segments can be shared by different processes, and their
segment descriptor tables must contain the same elements that
describe that segment
❖
Physical memory corresponding to the process address space
should not necessarily be continuous now. In fact,
segmentation
allows individual portions of the address space to be mapped, not to
the main memory, but to the disk and reloaded as needed, ensuring
that processes
of any size are executed
This approach is not without its disadvantages.
❖
The need to introduce an additional layer of memory conversion
causes a decrease in performance (this drawback is inherent in any
full implementation of virtual memory). Appropriate hardware
support is required for effective segmentation implementation
❖
Managing variable length memory blocks with the need to store
them on a disk
can be quite complicated
❖
The requirement that each segment corresponds to a contiguous
block of the physical memory of the appropriate size causes external
memory fragmentation. Internal fragmentation does not occur in this
case because the segments have a variable length and you can always
select a segment of the length required to execute the program
Today, segmentation is used rather limited,
primarily because of the
fragmentation and complexity of implementing efficient memory and disk-
sharing. Wider use of memory allocation got into blocks of fixed length -
page memory organization that will be discussed .