Virtual Memory (Sec. 5.7) - PowerPoint PPT Presentation

1 / 4
About This Presentation
Title:

Virtual Memory (Sec. 5.7)

Description:

Virtual Page No. Page off set. Physical Page No. Page off set. Translate ... So, we optimize page placement to reduce fault rate ... – PowerPoint PPT presentation

Number of Views:13
Avg rating:3.0/5.0
Slides: 5
Provided by: ziq
Category:

less

Transcript and Presenter's Notes

Title: Virtual Memory (Sec. 5.7)


1
Virtual Memory (Sec. 5.7)
  • Two Major Motivations
  • Allow efficient and safe sharing of memory among
    multiple programs
  • Allow a single program to exceed the size of main
    memory
  • Some Terminology
  • A virtual memory block is called a page
  • A miss is called a page fault
  • The CPU produces a virtual address, which is
    translated to a physical address
  • A physical address is used to access the main
    memory

2
Mapping Virtual Address to Physical Address
Virtual Address Physical Address Page size
4 KB Virtual address space 4 GB Physical
address space 1 GB
3
Page Table
  • Penalty for a page fault is very high
  • So, we optimize page placement to reduce fault
    rate
  • Hence, motivation to use fully associative
    placement
  • Pages are located using a page table
  • Page table is indexed with the page number of
    Virtual Addresses and contains the page numbers
    of Physical Addresses as data
  • Each program has its own page table

4
Fast Address Translation Translation
Look-aside Buffer (TLB)
  • A special cache is used for address translation,
    called Translation Look-aside Buffer (TLB)
  • Each tag entry of TLB holds portion of virtual
    page number
  • Each data entry of TLB holds a physical page
    number
  • On every reference, the TLB is searched to find
    the desired virtual page number
  • If it is a hit, continue
  • If it is a miss, check the Page Table
  • If it is a page fault, go to exception handling
  • If no page fault, load the TLB with the desired
    entry
Write a Comment
User Comments (0)
About PowerShow.com