Lab. No. 14 Page Replacement Direction:Paging ReplacementAlgorithm in C++.
Lab. No. 14
Page Replacement
Direction:Paging ReplacementAlgorithm in C++.
#include
using namespace std;
#include
int main()
{
intnop,nof,page[20],i,count=0;
cout<<"\n\tEnter the No. of Pages:";
cin>>nop;
cout<<"\n\t Enter the Reference String:";
for(i=0;i>page[i];}
cout<<"\n\t Enter the No of frames:-";
cin>>nof;
int frame[nof],fcount[nof];
for(i=0;i";
if(flag==0)
{
if(i>=nof)
{
int max=0,k=0;
while(k
Comments
Post a Comment