Virtual Memory 1
Virtual Memory 1
Virtual Memory-1
Background
Demand Paging
Copy-on-Write
Objectives
Virtual-address Space
Shared Library Using Virtual Memory
Demand Paging
Bring a page into memory only when it is needed
Less I/O needed
Less memory needed
Faster response
More users
i
i
page table
During address translation, if valid–invalid bit in page table
entry
is I page fault
Page Table When Some Pages Are Not in Main Memory
Page Fault
If there is a reference to a page, first reference to
that page will trap to operating system:
page fault
1. Operating system looks at another table to
decide:
Invalid reference abort
Just not in memory
2. Get empty frame
3. Swap page into frame
4. Reset tables
5. Set validation bit = v
6. Restart the instruction that caused the page fault
Page Fault (Cont.)
Restart instruction
block move
- Copy-on-Write