Virtual Memory Concepts

References

Overview

A System Using Physical Addressing

A System Using Virtual Addressing

Address Spaces

Why Virtual Memory (VM)?

VM as a Tool for Caching

DRAM Cache Organization

Enabling Data Structure: Page Table

Page Hit

Page Fault

Triggering a Page Fault

Handling a Page Fault

Handling a Page Fault

Completing Page Fault

Allocating Pages

Locality to the Rescue Again

VM as a Tool for Memory Management

VM as a Tool for Memory Management

VM as a Tool for Memory Management

Simplified Linking and Loading

VM as a Tool for Memory Protection

VM Address Translation

Summary of Address Translation Symbols

Address Translation with a Page Table

Address Translation: Page Hit

  1. Processor sends virtual address to MMU
  2. MMU requests PTE from page table in memory
  3. MMU fetches PTE from page table in memory
  4. MMU sends physical address to cache/memory
  5. Cache/memory sends data word to processor

Address Translation: Page Fault

  1. Processor sends virtual address to MMU
  2. MMU requests PTE from page table in memory
  3. MMU fetches PTE from page table in memory
  4. Valid bit is zero, so MMU triggers page fault exception
  5. Handler identifies victim (and, if dirty, pages it out to disk)
  6. Handler pages in new page and updates PTE in memory
  7. Handler returns to original process, restarting faulting instruction

Integrating VM and Cache

Speeding up Translation with a TLB

Summary of Address Translation Symbols

Accessing the TLB

TLB Hit

TLB Miss

Multi-Level Page Tables

A Two-Level Page Table Hierarchy

Translating with a k-level Page Table

Summary