Lecture 18 Paging - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Lecture 18 Paging

Description:

Lecture 18. Paging. Page Table Structure. Problem. Very ... each process may need up to 4 megabytes of physical address space for the table page alone. A two ... – PowerPoint PPT presentation

Number of Views:93
Avg rating:3.0/5.0
Slides: 11
Provided by: eam80
Category:

less

Transcript and Presenter's Notes

Title: Lecture 18 Paging


1
Lecture 18Paging
  • Page Table Structure

2
Problem Very Large Logical Address Space
  • Consider a system with 32-bit logical address
    space
  • Page size 4K bytes (212)
  • Then, a page table may consists of up to 1
    million entries (232/212)
  • Each entry consists of 4 bytes, each process may
    need up to 4 megabytes of physical address space
    for the table page alone

3
A two-level page-table scheme
  • A logical address (on 32-bit machine with 4K page
    size) is divided into
  • a page number consisting of 20 bits.
  • a page offset consisting of 12 bits.
  • Since the page table is paged, the page number is
    further divided into
  • a 10-bit page number.
  • a 10-bit page offset.
  • Thus, a logical address is as follows
  • where pi is an index into the outer page table,
    and p2 is the displacement within the page of the
    outer page table.

From Operating System Concepts. Silbershatz
Galvin. Addison Wesley
4
Two-Level Page-Table Scheme
From Operating System Concepts. Silbershatz
Galvin. Addison Wesley.
5
A Problem
  • Usually, a process has a page table associated
    with it
  • The page table has one entry for each page that
    the process is using
  • Each page table may consists of millions of
    entries
  • These tables may consume large amounts of
    physical memory, which is requested just to keep
    track of how the other physical memory is being
    used

6
Inverted Page Table
  • An inverted page table has one entry for each
    real page (frame) of memory
  • Each entry consists
  • Virtual address of the page stored in that real
    memory location
  • Information about the process that owns that page

7
Inverted Page Table Architecture
From Operating System Concepts. Silbershatz
Galvin. Addison Wesley.
8
Inverted Page Table Structure
9
Shared Pages
  • Shared code
  • One copy of read-only (reentrant) code shared
    among processes (i.e., text editors, compilers,
    window systems).
  • Shared code must appear in same location in the
    logical address space of all processes.
  • Private code and data
  • Each process keeps a separate copy of the code
    and data.
  • The pages for the private code and data can
    appear anywhere in the logical address space.

From Operating System Concepts. Silbershatz
Galvin. Addison Wesley
10
Shared Pages
From Operating System Concepts. Silbershatz
Galvin. Addison Wesley
Write a Comment
User Comments (0)
About PowerShow.com