LRU Page Replacement Program in C++[How to] <div dir="ltr" style="text-align: left;" trbidi="on"> <h2 style="text-align: center;"> <span style="background-color: white; color: #3d85c6; font-family: Trebuchet MS, sans-serif;">Least Recently Used Page Replacement</span></h2> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;">Goal:- </span>Program for LRU page replacement Method.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;">Method:- </span>Replace the page that has not been used for the longest period of time.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;">Explanation:- </span>As we seen in <a href="http://codieehome.blogspot.in/2013/10/program-for-fifo-page-replacement.html" target="_blank"><span class="Apple-style-span" style="color: red;"><u>FIFO page Replacement</u></span></a> Algorithm the problem is Belady's Anomaly and this lead us to discovery of an <a href="http://codieehome.blogspot.in/2014/12/optimal-page-replacement-program-in.html" target="_blank"><span class="Apple-style-span" style="color: red;"><u>Optimal Page Replacement</u></span></a> method that will have minimum page fault rate.But the problem in Optimal Page Replacement is that it requires the future knowledge. So in the place of optimal we can take a approximation of optimal in which we look for the pages that has not been used for a long time and predict that they will not be used in near future.</span></span></h3> <h3 style="text-align: left;"> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-weight: normal;">So whenever a replacement request comes then we replace the new page with the page which has not been used for a long time and this method page replacement is known as Least Recently used(LRU) method.</span></h3> <h3 style="text-align: left;"> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-weight: normal;">For evaluating an algorithm we take a particular string of memory references ,called<span style="color: red;"> reference string</span>.</span></h3> <h3 style="text-align: left;"> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-weight: normal;">The LRU method is often used and considered to be good.</span></h3> <div> <h3 style="text-align: left;"> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-weight: normal;">The problem with this algorithm that how to implement LRU and there are several methods of implementing LRU. To know you can check my post(about to come).</span></span></h3> </div> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="color: red; font-weight: normal;">Page Fault:- </span><span style="font-weight: normal;"> Page Fault is a interrput that occurs when a program request page that is not in real memory.Then this interrput sends signal to OS to fetch that page from Virtual memory and load it into RAM.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">**Program explained here counts the no. of page fault occurs when a input reference string is implemented onto Memory according to LRU replacement method.</span></span></h3> <h3 style="text-align: left;"> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Example:-</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;"> </span>Reference string- 7,0,1,2,0,3,0,4</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"> No. of frames: 3</span></span></h3> <h3> <table align="center" border="1" cellpadding="10"><tbody> <tr> <th rowspan="2"><h3> <span style="font-family: Trebuchet MS, sans-serif;">Frame NO.</span></h3> </th> <th colspan="9"><h3> <span style="font-family: Trebuchet MS, sans-serif;">Reference String(Page Values)</span></h3> </th> </tr> <tr> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">Initially</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">7</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">0</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">1</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">2</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">0</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">3</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">0</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">4</span></h3> </th> </tr> <tr> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">7</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">7</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">7</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">2</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">2</span></h3> </td> <td><h3> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">2</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">2</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">4</span></h3> </td> </tr> <tr> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">2</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> </tr> <tr> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">3</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span class="Apple-style-span" style="color: red; font-family: 'Trebuchet MS', sans-serif;">3</span></h3> </td> <td><h3> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">3</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">3</span></h3> </td> </tr> </tbody></table> </h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">When any page value already presented in frames then no page fault will occur.</span></span></h3> <h3 style="text-align: left;"> </h3> <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br /> <!-- between_post2 --><br /> <ins class="adsbygoogle" data-ad-client="ca-pub-1000631018247743" data-ad-slot="8769746517" style="display: inline-block; height: 90px; width: 728px;"></ins><br /> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script><br /> <h3 style="text-align: left;"> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Program:-</span></span></h3> <span style="font-size: 12px;"><br /> <script class="brush:java" type="syntaxhighlighter"> #include<iostream> using namespace std; #include<conio.h> int main() { int nop,nof,page[20],i,count=0; cout<<"\n\tEnter the No. of Pages:"; cin>>nop; //Store the no of Pages cout<<"\n\t Enter the Reference String:"; for(i=0;i<nop;i++) { cout<<"\t"; cin>>page[i]; //Store the pages } cout<<"\n\t Enter the No of frames:-"; cin>>nof; int frame[nof],fcount[nof]; for(i=0;i<nof;i++) { frame[i]=-1; //Store the frames fcount[i]=0; //Track when the page is last used } i=0; while(i<nop) { int j=0,flag=0; while(j<nof) { if(page[i]==frame[j]){ //Checking whether page already exist in frames or not flag=1; fcount[j]=i+1; } j++; } j=0; cout<<"\n\t**************************************\n"; cout<<"\t"<<page[i]<<"-->"; if(flag==0) { int min=0,k=0; while(k<nof-1) { if(fcount[min]>fcount[k+1]) //Calculating the page which is least recently used min=k+1; k++; } frame[min]=page[i]; //Replacing it fcount[min]=i+1; //Increasing the time count++; //counting Page Fault while(j<nof) { cout<<"\t|"<<frame[j]<<"|"; j++; } } i++; } cout<<"\n\t**************************************\n"; cout<<"\n\tPage Fault is:"<<count; getch(); return 0; } </script> </span> <br /> <h3 style="text-align: left;"> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Output:-<div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTroGSSZRAzN7XVNz-ZIv8EH7p6-MiJpFMxICx9unC1uUutG0eO5PHz9fn4uaI_1xmh_t60MCATjaQEFHfB3z1_OJe7RB2OcUprGGTzDbA1ArwbNcrtiqIMY08xqy0troHyzZ3cJguR6g1/s1600/LRU.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTroGSSZRAzN7XVNz-ZIv8EH7p6-MiJpFMxICx9unC1uUutG0eO5PHz9fn4uaI_1xmh_t60MCATjaQEFHfB3z1_OJe7RB2OcUprGGTzDbA1ArwbNcrtiqIMY08xqy0troHyzZ3cJguR6g1/s1600/LRU.png" /></a></div> </span></span></h3> <div> <div class="separator" style="clear: both; text-align: center;"> </div> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"> </span></span></div> <h3 style="text-align: left;"> <span class="Apple-style-span" style="color: #93c47d; font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-weight: normal;"> </span></span></h3> <div> <h3 style="background-color: white; color: #333333; font-family: Bitter, serif, sans-serif; font-weight: normal; margin: 0px 0px 10px;"> <span style="font-size: large;"><span style="color: red; line-height: 19.1875px;">If you want to share more information about topic discussed above or find anything incorrect Please do comments.</span> </span></h3> </div> <span style="font-family: Bitter, serif, sans-serif; font-size: large;"><b style="color: #333333;">For more Programs Stay Connected</b><span style="color: #333333;">..</span><a href="http://www.facebook.com/codieehome" target="_blank"><span style="color: red;">Like</span></a><span style="color: #333333;"> us on Facebook.</span></span></div> LRU Page Replacement Program in C++[How to] Least Recently Used Page Replacement Goal:- Program for LRU page replacement Method. Method:- Replace the page that has not been us... + Read more »
Optimal Page Replacement Program in C++[How to] <div dir="ltr" style="text-align: left;" trbidi="on"> <h2 style="text-align: center;"> <span style="background-color: white; color: #3d85c6; font-family: Trebuchet MS, sans-serif;">Optimal Page Replacement</span></h2> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;">Goal:- </span>Program for Optimal page replacement Method.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;">Method:- </span>Replace the page that will not be used for the longest period of time.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;">Explanation:- </span>As we seen in <a href="http://codieehome.blogspot.in/2013/10/program-for-fifo-page-replacement.html" target="_blank"><span class="Apple-style-span" style="color: red;"><u>FIFO page Replacement</u></span></a> Algorithm the problem is Belady's Anomaly and this lead us to discovery of an algorithm that will have minimum page fault rate.The search ends at Optimal Page Replacement.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Optimal Page replacement algorithm will never suffer from Belady's Anomaly.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Use of this algorithm guarantees the lowest page fault rate for fixed no. of frames.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">For evaluating an algorithm we take a particular string of memory references ,called<span style="color: red;"> reference string</span>.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">In Optimal page replacement algorithm- for each page we track the time when it was brought into the memory and when any replacement request comes then we look for the page which is not going to be used in next future. </span></span></h3> <div> <h3 style="text-align: left;"> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-weight: normal;">The problem with this algorithm that it is difficult to implement because it requires the future knowledge of reference string.<u><a href="http://codieehome.blogspot.in/2014/12/lru-page-replacement-program-in-chow-to.html" target="_blank"><span class="Apple-style-span" style="color: red;">(How LRU solve this problem check here?)</span></a></u></span></span></h3> </div> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="color: red; font-weight: normal;">Page Fault:- </span><span style="font-weight: normal;"> Page Fault is a interrput that occurs when a program request page that is not in real memory.Then this interrput sends signal to OS to fetch that page from Virtual memory and load it into RAM.</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">**Program explained here counts the no. of page fault occurs when a input reference string is implemented onto Memory according to optimal replacement method.</span></span></h3> <h3 style="text-align: left;"> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Example:-</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><span style="color: #93c47d;"> </span>Reference string- 7,0,1,2,0,3,0,4</span></span></h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"> No. of frames: 3</span></span></h3> <h3> <table align="center" border="1" cellpadding="10"><tbody> <tr> <th rowspan="2"><h3> <span style="font-family: Trebuchet MS, sans-serif;">Frame NO.</span></h3> </th> <th colspan="9"><h3> <span style="font-family: Trebuchet MS, sans-serif;">Reference String(Page Values)</span></h3> </th> </tr> <tr> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">Initially</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">7</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">0</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">1</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">2</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">0</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">3</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">0</span></h3> </th> <th><h3> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;">4</span></h3> </th> </tr> <tr> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">7</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">7</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">7</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">2</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">2</span></h3> </td> <td><h3> <span class="Apple-style-span" style="color: red; font-family: 'Trebuchet MS', sans-serif;">3</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">3</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">4</span></h3> </td> </tr> <tr> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">2</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">0</span></h3> </td> </tr> <tr> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">3</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">-1</span></h3> </td> <td><h3> <span style="color: red; font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> <td><h3> <span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">1</span></h3> </td> <td><h3> <span style="font-family: Trebuchet MS, sans-serif;">1</span></h3> </td> </tr> </tbody></table> </h3> <h3 style="text-align: left;"> <span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">When any page value already presented in frames then no page fault will occur.</span></span></h3> <h3 style="text-align: left;"> </h3> <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br /> <!-- between_post2 --><br /> <ins class="adsbygoogle" data-ad-client="ca-pub-1000631018247743" data-ad-slot="8769746517" style="display: inline-block; height: 90px; width: 728px;"></ins><br /> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script><br /> <h3 style="text-align: left;"> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Program:-</span></span></h3> <script class="brush:java" type="syntaxhighlighter"> #include<iostream> using namespace std; #include<conio.h> int main() { int nop,nof,page[20],i,count=0; cout<<"\n\tEnter the No. of Pages:"; cin>>nop; //Store the no of pages cout<<"\n\t Enter the Reference String:"; for(i=0;i<nop;i++) { cout<<"\t"; cin>>page[i]; //Array for Storing Reference String } cout<<"\n\t Enter the No of frames:-"; cin>>nof; int frame[nof],fcount[nof]; for(i=0;i<nof;i++) { frame[i]=-1; //Frame Array fcount[i]=0; // Track the next Availability of frames } i=0; while(i<nop) { int j=0,flag=0; while(j<nof) { if(page[i]==frame[j]){ // Checking Whether the Page is Already in frame or not flag=1; } j++; } j=0; cout<<"\n\t**************************************\n"; cout<<"\t"<<page[i]<<"-->"; if(flag==0) { if(i>=nof) { int max=0,k=0; while(k<nof) { int dist=0,j1=i+1; while(j1<nop) { if(frame[k]!=page[j1]) //Calculating Distances of pages that are in the frame to their next occurence dist++; else { break; } j1++; } fcount[k]=dist; //Storing Distances into array k++; } k=0; while(k<nof-1) { if(fcount[max]<fcount[k+1]) //Finding out the maxximum distance max=k+1; k++; } frame[max]=page[i]; } else { frame[i%nof]=page[i]; } count++; // Increasing Page Fault. while(j<nof) { cout<<"\t|"<<frame[j]<<"|"; j++; } } i++; } cout<<"\n\t**************************************\n"; cout<<"\n\tPage Fault is:"<<count; getch(); return 0; } </script> <br /> <h3 style="text-align: left;"> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Output:-</span></span></h3> <div> <table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody> <tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkKgSTecaNMJo4wBA9aAruAv0-zU-wIon30F1pbc4ZLkkv842PPnGRZRvE3JKS76Rx6aMESuHz0aXiRAdqzmmfx2z7xCWSxsSbSRhBVBcigOc3bIpJg7hBO7HFey2YhK3gb8DQUXAWW9_/s1600/optimal.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkKgSTecaNMJo4wBA9aAruAv0-zU-wIon30F1pbc4ZLkkv842PPnGRZRvE3JKS76Rx6aMESuHz0aXiRAdqzmmfx2z7xCWSxsSbSRhBVBcigOc3bIpJg7hBO7HFey2YhK3gb8DQUXAWW9_/s1600/optimal.png" /></a></td></tr> <tr><td class="tr-caption" style="text-align: center;">Optimal Page Replacement</td></tr> </tbody></table> <span style="color: #93c47d; font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"> </span></span></div> <h3 style="text-align: left;"> <span class="Apple-style-span" style="color: #93c47d; font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-weight: normal;"> </span></span></h3> <div> <h3 style="background-color: white; color: #333333; font-family: Bitter, serif, sans-serif; font-weight: normal; margin: 0px 0px 10px;"> <span style="font-size: large;"><span style="color: red; line-height: 19.1875px;">If you want to share more information about topic discussed above or find anything incorrect Please do comments.</span> </span></h3> </div> <span style="font-family: Bitter, serif, sans-serif; font-size: large;"><b style="color: #333333;">For more Programs Stay Connected</b><span style="color: #333333;">..</span><a href="http://www.facebook.com/codieehome" target="_blank"><span style="color: red;">Like</span></a><span style="color: #333333;"> us on Facebook.</span></span></div> Optimal Page Replacement Program in C++[How to] Optimal Page Replacement Goal:- Program for Optimal page replacement Method. Method:- Replace the page that will not be used for the... + Read more »