Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Please solve the problems (http://www.go4expert.com/forums/solve-t21828/)

bsudhir6 18Apr2010 04:32

Please solve the problems
 
2 Attachment(s)
I wrote a program which implements Optimal page replacement algorithm i'm mentioning what is Optimal page replacement algorithm and the code i've written and i commented each step...

<please note that i just modified the program of FIFO written by mr. ranjith and implemented my logic where the diffrence comes>

What is optimal page replacement?
Attachment 662

The program i written
Attachment 663

I'm getting unreachable code errors and wrong output

output must be
2 -1 -1
2 3 -1
2 3 -1
2 3 1
2 3 5
2 3 5
4 3 5
4 3 5
4 3 5
2 3 5
2 3 5
2 3 5


All times are GMT +5.5. The time now is 11:36.