1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please solve the problems

Discussion in 'C' started by bsudhir6, Apr 18, 2010.

  1. bsudhir6

    bsudhir6 New Member

    Joined:
    Apr 4, 2010
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    0
    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?
    View attachment Optimal Page Replacement Algorithm.pdf

    The program i written
    View attachment OPTIMAL.txt

    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
     

Share This Page