{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Set up a page table to translate logical to physical

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ontiguous! Set up a page table to translate logical to physical addresses. page i -> frame ? Some internal fragmentation. Address Address Translation Scheme Address generated by CPU is divided into: • Page number (p) – used as an index into a page table which contains contains base address of each page in physical memory. • Page offset (d) – combined with base address to define the physical physical memory address that is sent to the memory unit. physical memory 0 text data BSS 511 user stack args/env kernel Page size (PS) Frame size PS = 128 Address Address Translation Architecture p (or vpn) = log_addr log_addr/PS d= log_addr % PS phys_addr phys_addr = frame table not shown Simple Simple Paging Example PS PS = 128 log_addr = 130 vpn = log_addr/PS d = log_addr % PS phys_addr = PS*PT[vpn]+d A Simple Page Table Simple Each process/VAS has its its own page table. Virtual addresses are translated relative to the current page table. process page table PFN 0 PFN 1 PFN i In this example, each VPN j maps to PFN j, but but in practice any physical frame may be used for any virtual page. PFN i + offset page #i offset user virtual address physical memory page frames The page tables are themselves stored in memory; a protected register holds a pointer to the current page table. Page Page and Address Sizes Suppose logical address consists of: 20 bits for the page number 12 bits for the offset How big is a virtual address? What is the size of a page? How How big is the virtual address space? How many entries are in the page table? How much memory does the page table take up? Implementation Implementation of Page Table Page table (for each process) is kept in main memory. Page-table base register (PTBR) points to the current page table. Page-table length register (PRLR) indicates size of the page table. In this scheme every data/instruction access requires two memory accesses. One for the page table and one for the data/instruction. The The two memory access problem can be solved by the use of a special fast-lookup hardware cache called associative registers or translation look-aside buffers (TLBs) Translation Translation Lookaside Buffer (TLB) Associative Associative registers – parallel search Page # 0 Frame # 1 Address translation (A´, A´´) • If A´ is in associative register, get fr...
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