Académique Documents
Professionnel Documents
Culture Documents
Systems
Lecture 36
Syed Mansoor Sarwar
Agenda for Today
Review of previous lecture
Paged segmentation
Examples of paged
segmentation: MULTICS under
GE 345 and OS/2, Windows,
and Linux under Intel CPUs
14 September 2019 © Copyright Virtual University of
Pakistan
Review of Lecture 35
Sharing in paging
Segmentation
CPU
3
4
logical memory
14 September 2019 physical
© Copyright Virtual University
Pakistan
of memory
Paged Segmentation
0
1 1
1 2
3 0
2 .
3 .
3 1 .
4
126
10 3
10
5 page
table 126 2
127
logical memory
© Copyright Virtual University of physical memory
14 September 2019
Pakistan
Paged Segmentation
Logical address is still <s,d>,
with s used to index the
segment table
Each segment table entry
consist of the tuple
<segment-length, page-table-base>
The logical address is legal if
d < segment-length
14 September 2019 © Copyright Virtual University of
Pakistan
Paged Segmentation
Segment offset, d, is
partitioned into two parts: p
and d’, where p is used to
index the page table
associated with segment, s,
and d’ is used as offset
within a page
14 September 2019 © Copyright Virtual University of
Pakistan
Paged Segmentation
p indexes the page table to
retrieve frame, f, and
physical address (f,d’) is
formed
s d
index
segment p d’
table
index page offset within the
14 September 2019 © Copyrighttable
Virtual University of page p
Pakistan
Paged Segmentation
3921
3 849
12 12 849
13137
14 September 2019 © Copyright Virtual University of
Pakistan
Intel 80386 Example
IBM OS/2, Microsoft Windows,
and Linux
Paged segmentation with two-
level paging
Logical address = 48 bits
16-bit selector and 32-bit offset
Page size = 4 KB
14 September 2019 © Copyright Virtual University of
Pakistan
Intel 80386 Example
4-byte page table entry
32-entry TLB, covering 32*4K
(128 KB) memory … TLB
Reach
13-bit Segment #
s g p 2-bit field for
1-bit field to specifying the
specify GDT or privilege level
LDT
14 September 2019 © Copyright Virtual University of
Pakistan
Intel 80386 Example
Real Mode
20-bit physical address is
obtained by shifting left the
Selector value by four bits and
adding to it the 16-bit effective
address
14 September 2019 © Copyright Virtual University of
Pakistan
Recap of Lecture
Paged segmentation
Examples of paged
segmentation: MULTICS
under GE 345 and OS/2,
Windows, and Linux under
Intel CPUs
14 September 2019 © Copyright Virtual University of
Pakistan
Operating
Systems
Lecture 36
Syed Mansoor Sarwar