Operating Systems: Syed Mansoor Sarwar
Operating Systems: Syed Mansoor Sarwar
Operating Systems: Syed Mansoor Sarwar
Systems
Lecture 35
Syed Mansoor Sarwar
Agenda for Today
Review of previous lecture
Sharing in paging
Segmentation
Multi-level paging
3
4
logical memory
14 September 2019 physical
© Copyright Virtual University
Pakistan
of memory
Segmentation
11
1 44
2
5
3
4 22
5 33
logical memory
14 September 2019 physical
© Copyright Virtual University of memory
Pakistan
Segmentation
11
44
1
2 5
3 22
4
segment 33
5 table
14 September 2019
logical memory © Copyright Virtual University of
Pakistan physical memory
Segmentation
Logical address consists of a
two tuple:
<segment-number, offset>
Segment table – maps two-
dimensional logical addresses
to physical addresses
14 September 2019 © Copyright Virtual University of
Pakistan
Segmentation
Each segment table entry has:
base – contains the starting
physical address where the
segments reside in memory.
limit – specifies the length of
the segment.
14 September 2019 © Copyright Virtual University of
Pakistan
Segmentation
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
14 September 2019 © Copyright Virtual University of
Pakistan
Segmentation
CPU