What is Segmentation?

Segmentation

  • Segmentation is a memory-management scheme that supports this programmer 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 programmer therefore specifies each address by two quantities: a segment name and an offset.
  • 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>.

  • Normally, when a program is compiled, the compiler automatically constructs segments reflecting the input program.
  • A logical address consists of two parts: a segment number, s, and an offset into that segment, d.
  • The segment number is used as an index to the segment table. The offset d of the logical address must be between 0 and the segment limit.
  • When an offset is legal, it is added to the segment base to produce the address in physical memory of the desired byte.
segmentation

Leave a Reply

Your email address will not be published. Required fields are marked *