Consider a main memory with the capacity of 3 page frames which are initially empty. Page reference is 4, 7, 6, 1, 7, 6, 1, 2, 7, 2. What is the number of…
Consider a main memory with the capacity of 3 page frames which are initially empty. Page reference is 4, 7, 6, 1, 7, 6, 1, 2, 7, 2. What is the number of page fault using optimal page replacement algorithm?
Show answerHide answer
Correct answer: (C) 5
Explanation
Faults for 4, 7, 6 (3). Page 1: evict 4 (never used again), fault 4. 7, 6, 1 hit. Page 2: evict 6 or 1 (never used again), fault 5. 7 and 2 hit. Total 5 page faults.