CS 537 Notes, Section #16: Paging


OSTEP Chapters 18 and 20

Paging

Goal is to make allocation and swapping easier, and to reduce memory fragmentation.


Page Table

Now, let's put size information on the table:


Page Table with size numbers

Problems:


Two-Level (Multi-Level) Paging

Use two levels of mapping to make tables manageable.

Now, let's put size information on the table:


Two level page table

Two level page table with size numbers

Segmentation and Paging

Use two levels of mapping, with logical sizes for objects, to make tables manageable.


Segment & Page Tables

Pages eliminate external fragmentation, and make it possible for segments to grow without any reshuffling.

If page size is small compared to most segments, then internal fragmentation is not too bad.

The user is not given access to the paging tables.

If translation tables are kept in main memory, overheads could be very high: 1 or 2 overhead references for every real reference.

IBM System 370 example: 24-bit virtual address space, 4 bits of segment number, 8 bits of page number, and 12 bits of offset. Segment table are in registers and not in memory. Segment table entries contain the real address of page table along with the length of the page table (a sort of bounds register for the segment). Page table entries are only 12 bits, real addresses are 24 bits.


Segment & Page Tables with numbers

Another example you can try: the DEC VAX.

In current systems, you will see three and even four-level schemes to handle 64-bit address spaces.



Copyright © 2011, 2018, 2020 Barton P. Miller
Non-University of Wisconsin students and teachers are welcome to print these notes their personal use. Further reproduction requires permission of the author.