Xiang Yong, Chen Yu, Li Guoliang, Ren Ju
Spring 2023
Outline
FIFO: Assume initial order is a->b->c Number of physical pages: 3 -> Number of page faults: 9
FIFO page replacement algorithm: assume initial order a->b->c Number of physical pages: 4 -> Number of page faults: 1
The set of logical pages currently used by a process, it can be expressed as a binary function W(t, Δ\DeltaΔ)
Page access record: W(t, Δ\DeltaΔ) ={1,2,5,6,7} , working set window size τ=10\tau=10τ=10, current time t=t1t=t_1t=t1
Page access record: W(t, Δ\DeltaΔ) ={1,2,3,4,5,6,7} , working set window size τ=10\tau=10τ=10, current time t=t1t=t_1t=t1
Page access record: W(t, Δ\DeltaΔ) ={3,4}, working set window size τ=10\tau=10τ=10, current time t=t2t=t_2t=t2
The set of pages that are actually present in the memory of a process at the current time.
Idea
Working set window size τ\tauτ
Implementation
τ=4\tau=4τ=4
The number of page faults / the number of memory accesses or the reciprocal of the average time interval between page faults.
By adjusting the resident set size, the page fault frequency of each process keeps in a reasonable range.
Assuming the window size is 2
Thrashing
Cause of thrashing
The OS needs to balance the concurrency level and page fault frequency
refer: https://pages.cs.wisc.edu/~remzi/OSTEP/vm-complete.pdf
Note this term is from NYU's Slide https://cs.nyu.edu/~gottlieb/courses/2010s/2010-11-spring/os2250/lectures/lecture-10.html#local-global-replacement
