(OS'25) Lecture 5
(OS'25) Lecture 5
Chapter 8
Virtual Memory – Part II
[OS Role]
Dave Bremer
Otago Polytechnic, N.Z.
©2008, Prentice Hall
Shared
Memory CPU Resourc
e
• Stanford CS140
– Lec.5 Virtual Memory (H/W)
• Berkeley CS162
– Lec.13 Address Translation + Caching
Agenda
• OS Roles
– Main Goal
– Fetch Policy
– Placement Policy
– Replacement Policy
• Intel MMU
• Questions (Credits to Dr. Ahmed Salah)
OS Main Goal
• Minimize page faults
Solution
Opt1: prefer clean over modified (modified clock)
• Optimal
0 0 1 1 0 3 1 2 2 4 3 0
0 0 0 0 0 3 3 3 3 3 3 0
1 1 1 1 1 2 2 4 4 4
F F F F
Solution
• Clock
0 0 1 1 0 3 1 2 2 4 3 0
0* 0* 0* 0* 0* 3* 3* 3 3 4* 4 0*
1* 1* 1* 1 1* 2* 2* 2* 3* 3*
F F F F F
Question
Midterm’19 Q4
Midterm’19 Q4