Performance Penalty of Virtual Memory
Wish to read a location in Main Memory. Steps are:
- Present a virtual address to Main Memory.
- Determine if corresponding page is in Main Memory by accessing Page Table.
- If page is in Main Memory, access Main Memory again to obtain contents of location in page.
- If page is not in Main Memory, interrupt program and call a Page Fault Handler to bring in the page from disk.
- Repeat read, this time page is in Main Memory
Even assuming 100% HIT rate in Main Memory, the penalty of using virtual memory is 2X.