Example
Consider page reference string 1, 3, 0, 3, 5, 6 with 3 page frames.Find number of page faults.
1) Initially all slots are empty, so when 1, 3, 0 came they are allocated to the empty slots —> 3 Page Faults.
2) When 3 comes, it is already in memory so —> 0 Page Faults.
3) Then 5 comes, it is not available in memory so it replaces the oldest page slot i.e 1. —> 1 Page Fault.
4) 6 comes, it is also not available in memory so it replaces the oldest page slot i.e 3 —> 1 Page Fault.
5) Finally when 3 come it is not avilable so it replaces 0 -> 1 page fault.
Learn More