0 votes 0 votes HeadShot asked Aug 11, 2018 HeadShot 685 views answer comment Share Follow See all 15 Comments See all 15 15 Comments reply Show 12 previous comments Shaik Masthan commented Aug 12, 2018 reply Follow Share then, how page 1 occurs twice? 0 votes 0 votes srestha commented Aug 16, 2018 reply Follow Share @Shaik that means there is a hit then according to u how enque(dequeue()) moreover I think here should not be dequeue work rt? 0 votes 0 votes Shaik Masthan commented Aug 17, 2018 reply Follow Share Now, i understood your doubt mam... let there are 3 frames allocated to the process therefore i am using 3 Pointers,P1,P2 and P3 ( i am not worrying about space complexity and time complexity ) let referring page=i and the pages coming in the sequence matched by P1,P2 and P3 respectively. ( i mean if 2,3,4 pages referred in the sequence then P1 points to 2, P2 points to 3 and P4 points to 4) if( *P1 == i ) ------- hit at P1 { P1=P2 P2=P3 P3 = & i } if( *P2 == i ) ------- hit at P2 { P2=P3 P3 = & i } else if( *P3 == i ) ------- hit at P3 { P3 = & i } else ----- page fault { temp=P1 P1=P2 P2=P3 P3 = replace(temp,i) } 1 votes 1 votes Please log in or register to add a comment.