{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Two-Level page tables

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

Info icon This 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
Image of page 1

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

View Full Document Right 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
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 00
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern