Virtual memory and page replacement
Operating Systems · Engineering
Study notes
Frames hold [1,2,3], reference string 1,2,3,4,1,2. FIFO: fault on 4 (evict 1), then 1 faults (evict 2), then 2 faults (evict 3): 6 faults total. LRU: fault on 4 evicts 1 (least recent), then 1 faults evicting 4, then 2 hits: 5 faults. LRU wins by keeping hot pages.