Operating Systems Lab Manual / OS Page Replacement Algorithm Optimal

Program Name Write C Program for Operating system Page Replacement Algorithm Optimal
Theory
In Optimal pages are replaced in the memory based optimally.
Program
Input
Page Replacement Algorithm - OPTIMAL
Enter length of the reference string:	12
Enter the reference string:1 2 3 4 1 2 5 1 2 3 4 5  
Enter Number of frames:3
Output
1	-1	-1	
1	2	-1	
1	2	3	
1	2	4	
1	2	4	
1	2	4	
1	2	5	
1	2	5	
1	2	5	
3	2	5	
4	2	5	
4	2	5	

Number of page faults:	7
Page fault rate = 58.333332 


Home     Back