Optimal Page Replacement algorithm if same code example
Example: Optimal Page Replacement Algorithm
Input : Number of frames, fn = 3
Reference String, pg[] = {1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6};
Output : No. of hits = 11
No. of misses = 9
Input : Number of frames, fn = 4
Reference String, pg[] = {7, 0, 1, 2,
0, 3, 0, 4, 2, 3, 0, 3, 2};
Output : No. of hits = 7
No. of misses = 6