GATE 2014 CS (CS1) – Question 43
Three page frames are initially empty. For reference string 1,2,3,4,2,1,5,3,2,4,6, find page faults using optimal replacement.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 7 to 7
Explanation
Load1,2,3 for three faults. On4 evict3(farthest future use), then2,1hit. On5 evict1, which is never reused; on3 evict5. The following2,4hit and6causes the seventh fault. Hence **7faults** with three initially empty frames.