Unformatted text preview: VP 3 Virtual memory (disk) VP 1 Memory resident page table (DRAM) VP 2 VP 3 VP 4 VP 6 VP 7 Virtual Memory as Cache PP 0 PP 3 University of Washington Why does it work? Locality ¢ Virtual memory works well because of locality § Same reason that L1 / L2 / L3 caches work ¢ The set of virtual pages that a program is “acMvely” accessing at any point in Mme is called its working set § Programs with beker temporal locality will have smaller working sets ¢ If (working set size < main memory size): § Good performance for one process amer compulsory misses ¢ If (SUM(working set sizes) > main memory size): § Thrashing: Performance meltdown where pages are swapped (copied) in and out conKnuously Virtual Memory as Cache University of Washington Virtual Memory (VM) ¢
¢ Overview and moMvaMon IndirecMon VM as a tool for caching Memory management/protecMon and address translaMon Virtual memory example Address TranslaMon University of Washington VM for Managing MulMple Processes ¢ Key abstracMon: each process has its own virtual address space § It can view memory as a simple linear array ¢ With virtual memory, this simple linear virtual address space need not be conMguous in physical memory § Process needs to store data in another VP? Just map it to any PP! Virtual Address Space for Process 1: 0 VP 1
VP 2 Address translaKon 0 PP 2 ... Physical Address Space (DRAM) N-‐1 PP 6 Virtual Address Space for...
View Full Document
This document was uploaded on 04/04/2014.
- Fall '09