CPSC 410/611: Operating Systems Virtual Memory 1
Virtual Memory!
- Overview / Motivation!
- Simple Approach: Overlays!
- Locality of Reference!
- Demand Paging!
- Policies!
– Placement! – Replacement! – Allocation!
- Case Studies: Unix SystemV!
- Reading: Silberschatz, Chapter 9!
Process 2! AA BB CC DD EE FF GG 1 2 3 4 5 6 HH 7 logical memory 1 v 9 v
1
i
2
i
3
i
4
i
5
i
6
i
7
page table
Demand Paging!
- “Lazy Swapper”: only swap in pages that are needed.!
- Whenever CPU tries to access a page that is not swapped in, a page
e fa fault occurs.!
Process 1! A B C D E F G 1 2 3 4 5 6 H 7 logical memory 4 v i
1
10 v
2
i
3
i
4
8 v
5
i
6
i
7
page table 1 6 7 2 3 4 5 8 9 10 11 12 physical memory backing store AA BB CC DD A B C D E F A F C AA BB