Consider a demand paging system with four page frames (initially empty) and the LRU page replacement policy. For the page reference string 7, 2, 7, 3, 2, 5, 3, 4, 6, 7, 7, 1, 5, 6, 1, the page fault rate (ratio of the number of page faults to the number of memory accesses, rounded off to one decimal place) is ____.
Explanation
Simulating LRU with 4 frames (recency order shown, most-recently-used last): 7→miss[7]; 2→miss[7,2]; 7→hit[2,7]; 3→miss[2,7,3]; 2→hit[7,3,2]; 5→miss[7,3,2,5]; 3→hit[7,2,5,3]; 4→miss, evict LRU=7, [2,5,3,4]; 6→miss, evict 2, [5,3,4,6]; 7→miss, evict 5, [3,4,6,7]; 7→hit[3,4,6,7]; 1→miss, evict 3, [4,6,7,1]; 5→miss, evict 4, [6,7,1,5]; 6→hit[7,1,5,6]; 1→hit[7,5,6,1]. Faults occur at references 1,2,4,6,8,9,10,12,13 — 9 faults out of 15 total accesses. Page fault rate = 9/15 = 0.6.
Source: GATE CS 2022 (2022)
This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.