- Users prefer to view memory as a collection of variable-sized segments, with no necessary ordering among segments (Figure 8.18).
Figure 8.13:
User's view of a program.
|
- Consider how you think of a program when you are writing it. You think of it as a main program with a set of methods, procedures, or functions.
- Segmentation is a memory-management scheme that supports this user view of memory. A logical address space is a collection of segments.
- Each segment has a name and a length. The addresses specify both the segment name and the offset within the segment.
- The user therefore specifies each address by two quantities:
- For simplicity of implementation, segments are numbered and are referred to by a segment number, rather than by a segment name.
- Thus, a logical address consists of a two tuple:
<segment-number, offset>
Cem Ozdogan
2011-02-14