Vpn 00 01 02 03 04 05 06 07 ppn 28 33 02 16 valid 1 0

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: r approaches, such as trying to predict misses and swap pages in before they are actually referenced, are possible. However, all modern systems use demand paging. 10.3.5 Allocating Pages Figure 10.8 shows the effect on our example page table when the operating system allocates a new page of virtual memory, for example, as a result of calling malloc. In the example, VP 5 is allocated by creating room on disk and updating PTE 5 to point to the newly created page on disk. 10.4. VM AS A TOOL FOR MEMORY MANAGEMENT Physical Memory (DRAM) VP 1 PP 0 VP 2 VP 7 VP 3 493 Physical page number or Valid disk address null PTE 0 0 1 1 0 0 0 0 PTE 7 1 PP 3 Virtual Memory (disk) VP 1 Memory resident page table (DRAM) VP 2 VP 3 VP 4 VP 5 VP 6 VP 7 Figure 10.8: Allocating a new virtual page. The kernel allocates VP 5 on disk and points PTE 5 to this new location. 10.3.6 Locality to the Rescue Again When many of us learn about the idea of virtual memory, our first impression is often that it must be terribly inefficient. Given the large miss penalties, we worry that pa...
View Full Document

Ask a homework question - tutors are online