§ Segmentation is a memory management scheme in which the physical memory allocated to the process is non-contiguous.
§ In Segmentation logical address space is divided into number of small blocks known as Segment.
§ Segments are of variable and each segment is allocated memory independently.
§ The responsibility for dividing the program into segments lies with the user. The operating system is uninvolved.
§ Each Segment has a name and a length. The addresses specify both the segment name and the offset within the segment.
§ In Segmentation, a logical address consists of two parts: segment number and offset. An offset is the location in a distinct segment in main memory. Segment number is used as an index into a segment table which contains base address of each segment in physical memory and a limit of segment.
§ A Segment table has two fields: base address of the segment and limit of the segment.
§ The base address of a segment is the location of a particular segment in the main memory, from where the segment starts.
§ Segmentation can be implemented using or without using paging.
§ Unlike paging, segment is having varying sizes and thus eliminates internal fragmentation.
§ External fragmentation still exists but to lesser extent.
§ The use of protection bits prevents illegal access to the memory locations. In this way, an attempt to write to a read-only segment fails.
§ The sharing of code or data is possible even in segmentation.
§ As with paging, this mapping also requires two memory references per logical address. This slows down a system by a factor of 2.
§ Segmentation suffers from external fragmentation. This may occurs when all the blocks in the memory are too small to accommodate segment.
§ Another Disadvantage of segmentation is that the programmer must be aware of the maximum size limits of the segments.