Wednesday, June 15, 2011

What is segmentation? Explain the process of address mapping in segmented system.

Segmentation:
Segmentation is a memory management scheme which supports programmer’s view of memory. Programmers never think of their programs as a linear array of works. Rather, the think of their programs as a collection of logically related entities, such as subroutines or procedures, functions, global or local data areas, stack etc., as depicted in following figure.

Address mapping in Segment system:

An important component of address mapping in a segmented system is a segment table.
A virtual (logical) address consists of two parts: a segment number and an offset into that segment. The Segment number provides in the virtual address is used as in index into the segment table. Each row of the segment table contains a starting address (base address) of Segment and a size of the segment. The offset of the virtual address must be within (less than or equal to) the size of the segment. If the offset of virtual address is not within the range, it is trapped by the operating System otherwise the offset is added to the base address of the segment to produce physical address of the desired segment.

No comments:

Post a Comment