Memory-management scheme that supports user view of memory.
A program is a collection of segments. A segment is a logical unit such as:
User’s View of a Program
Logical address consists of a two tuple: <segment-number, offset>,
Segment table – maps two-dimensional physical addresses; each table entry has:
1. base – contains the starting physical address where the segments reside in memory.
2. limit – specifies the length of the segment.
Segment-table base register (STBR) points to the segment table’s location in memory.
Segment-table length register (STLR) indicates number of segments used by a program;
segment number s is legal if s < STLR.
2. by segment table
4. shared segments
5. same segment number
7. first fit/best fit
8. external fragmentation
Protection. With each entry in segment table associate:
1. validation bit = 0 _ illegal segment
2. read/write/execute privileges
Protection bits associated with segments; code sharing occurs at segment level.
Since segments vary in length, memory allocation is a dynamic storage-allocation problem.
A segmentation example is shown in the following diagram
Example of Segmentation
Sharing of Segments