All Programs are Written and Compiled in Dev C++. So, it may generate some error in case of other compilers and may need some modifications in program. Download Dev C++

Friday 12 December 2014

Least Recently Used Page Replacement Program

AIM: To Implement LRU Page Replacement Program

#include<iostream>
using namespace std;
int main()
{
int p[50],fr[10],used[10];
int i,j,k,n,fs,flag=0,pf=0,index;
cout<<"Enter no of Refrence Strings: ";
cin>>n;
cout<<"Enter Refrence Strings: ";
for(i=0;i<n;i++)
cin>>p[i];
cout<<"Enter Frame Size: ";
cin>>fs;

Implement MVT with First Fit Memory Management Technique

AIM: Implement MVT with No of Partititon and Apply First Fit Memory Management.

#include<iostream>
using namespace std;
int  main()
{
    int tm,rm,os,n,i,ps,pn,pt[10],pt1[10];
    int fra1,fra2,tf=0,tp=0,flag=0,c=0;
    cout<<"Enter Total Memory: ";
    cin>>tm;
    cout<<"Enter Memory Given to OS: ";
    cin>>os;
    rm=tm-os;
    cout<<"Enter No of Partiotion: ";
    cin>>pn;
    cout<<"Enter The Size for Each Partition\n";
    for(i=0;i<pn;i++)
    {
    cout<<"\nPartition"<<i+1<<": ";
    cin>>pt1[i];
    if(tp+pt1[i]<rm)
    {