Two-Level page tables - 00 2 4 5 7 10 9 1 2 3 4 5 6 7 8 9...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Two-Level page tables Using a one-level page table requires too much space: 220 entries * 4 bytes/entry =~ 4MB. Since the virtual memory address has a lot of gaps, most of these entries will be unused. Modern architectures use a multi-level page table to reduce the space needed
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Two-Level page tables The page number is divided into two parts: first-level page number and the second-level page number Example: VM address:0x00402657 Offset=0x657 (last 3 hex digits) First-level index (i) (10 bits) Second-level index (j) (10 bits) Offset (12 bits) First level Second level Offset 0000 0000 0100 0000 0010 0110 0101 0111
Background image of page 2
VM Address Translation VM address 1st level (i) 2nd level (j) offse t 31 22 21 12 11 0 First Level Page Table (one for each process). Second Level Page Tables (multiple tables for each process.) i 0x45000 0x70000 0 210-1 0x45000 0x450 00 0x700 00 0x450
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 00 2 4 5 7 10 9 1 2 3 4 5 6 7 8 9 10 11 Page Number Physical Mem VM Address Translation VM address:0x00402657 i=0x1 2nd level offse t 31 22 21 12 11 First Level Page Table Second Level Page Tables 0x70000 0x45000 210-1 0x65000 0x650 00 0x700 00 0x450 00 2 4 5 7 9 1 2 3 4 5 6 7 8 9 Page Number Physical Mem Page number in physical 1st level j=0x2 0x657 1 1 2 i j 210-1 Example VMaddress: 0x00402 657 Physical Memory Address: 0x2 657 1.From the VM address find i, j, offset 2. SecondLevelPageTable= FirstLevelPageTable[i] 3. PhysMemPageNumber = SecondLevelPageTable[j] 4. PhysMemAddr= PhysMemPageNum*Pagesize + offset Process always have a first-level page table Second level page tables are allocated as needed. Both the first level and second level page tables use 4KB....
View Full Document

This note was uploaded on 01/30/2012 for the course CS 354 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 5

Two-Level page tables - 00 2 4 5 7 10 9 1 2 3 4 5 6 7 8 9...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online