Databases Reference
In-Depth Information
The VMM does this by managing the virtual memory for each process. When necessary it will take the
physical memory behind virtual memory and put the data that resided in that memory into the page file
so that it is not lost.
When the process needs to use that data again, it needs to be re-loaded into physical memory. This is
called a hard page fault , and to fix it the VMM will go and get the data from the page file, find a free page
of memory either from its list of free pages or from another process, write the data from the page file into
memory, and map the new page back into the process's VAS.
OnasystemwithenoughRAMtogiveeveryprocessall the memory it needs, the VMM doesn't have to
do much other than give out memory and clean up after a process is done with it. On a system without
enoughRAMtogoaround,thejobisalittlemoreinvolved.TheVMMhastodosomeworktoprovide
each process with the memory it needs when it needs it. It does this by using the page file to temporarily
store data that a process hasn't accessed for a while. This process is called paging and the data is often
referred to as having been paged or swapped out to disk. Figure 6-2 shows two processes with various
pages swapped into memory and out to disk.
virtual address space of
process A
physical memory (RAM)
pagefile
virtual address space of
process B
swapped-out page
swapped-in page
unmapped page
Figure 6-2
Search WWH ::




Custom Search