GP - OS - Storage Allocation
GP - OS - Storage Allocation
Management
External Fragmentation
This phenomenon of entering and leaving the memory can cause the formation of
unusable memory holes (like the unused space between two vehicles). This is known as
External Fragmentation.
Suppose, if the main memory size is 16 KB and Frame size is 1 KB. Here, the main
memory will be divided into the collection of 16 frames of 1 KB each.
Disadvantages:
Internal fragmentation.
Page tables may consume more memory.
Segmentation
segmentation is another technique for the noncontiguous storage allocation. It is
different from paging as it supports users’ view of his program.
For a programmer it might be more relevant to divide the logical address space of his
program into variable sized segments (with respect to his view of main program,
subroutines, data, etc.) than to divide it into fixed size pages. Such variable sized
segments, which are a collection of logically related information, are the basis of
segmentation technique.
segmentation
For each segment, the table stores the starting address of the segment and the length
of the segment. A reference to a memory location includes a value that identifies a
segment and an offset.