16-vm-concepts

3 virtual memory disk vp 1 memory resident page table

Info iconThis 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: auses page fault (an excep2on) Virtual address Physical page number or Valid disk address PTE 0 0 null 1 1 0 1 0 0 PTE 7 1 null Physical memory (DRAM) VP 1 VP 2 VP 7 VP 4 PP 0 PP 3 Virtual memory (disk) VP 1 Memory resident page table (DRAM) VP 2 VP 3 VP 4 VP 6 VP 7 17 Carnegie Mellon Handling Page Fault     Page miss causes page fault (an excep2on) Page fault handler selects a vic2m to be evicted (here VP 4) Virtual address Physical page number or Valid disk address PTE 0 0 null 1 1 0 1 0 0 PTE 7 1 null Physical memory (DRAM) VP 1 VP 2 VP 7 VP 4 PP 0 PP 3 Virtual memory (disk) VP 1 Memory resident page table (DRAM) VP 2 VP 3 VP 4 VP 6 VP 7 18 Carnegie Mellon Handling Page Fault     Page miss causes page fault (an excep2on) Page fault handler selects a vic2m to be evicted (here VP 4) Virtual address Physical page number or Valid disk address PTE 0 0 null 1 1 1 0 0 0 PTE 7 1 null Physical memory (DRAM) VP 1 VP 2 VP 7 VP 3 PP 0 PP 3 Virtual memory (disk) VP 1 Memory resident page table (DRAM) VP 2 VP 3 VP 4 VP 6 VP 7 19 Carnegie Mellon Handling Page Fault       Page miss causes page fault (an excep2on) Page fault handler selects a vic2m to be evicted (here VP 4) Offending instruc2on is restarted: page hit! Virtual address Physical page number or Valid disk address PTE 0 0 null 1 1 1 0 0 0 PTE 7 1 null Physical memory (DRAM) VP 1 VP 2 VP 7 VP 3 PP 0 PP 3 Virtual memory (disk) VP 1 Memory resident page table (DRAM) VP 2 VP 3 VP 4 VP 6 VP 7 20 Carnegie Mellon Locality to the Rescue Again!     Virtual memory works because of locality At any point in ;me, programs tend to access a set of ac;ve virtual pages called the working set   Programs with bener temporal locality will have smaller working sets   If (working set size < main memory size)   Good performance for one process a[er compulsory misses   If ( SUM(working set s...
View Full Document

Ask a homework question - tutors are online