Virtual Memory is a memory management technique
Uses main memory and disk to create an illusion of very large and contiguous main memory to the user, which allows the execution of programs that are larger than the physical memory.
- Programs have separate virtual memory spaces.
- Processes share the main (physical) memory
Terms
- Page
A virtual block transferred between the main memory and disk - Page hit
Data accessed are in the main memory - Page fault
Data accessed are not in the main memory
Four design problem
- Where to place a page?
Fully associative or highly associative - How to find a page?
Address translation - Which page should be replaced on a page fault?
Sophisticated (e.g. LRU + the working set model) - What happens when writing data to (virtual) memory?
Always write-back and write allocate
disk reads/writes take millions of clock cycles
Address translation
Translation between virtual address and physical address, this will be handled by MMU
Using the slack time in an pipeline stage execution.
Makeing TLB accesses overlapped with another Processsor1