Posts

Showing posts from March, 2018

Write the simulation program for demand paging and show the page scheduling and total number of page faults according to FIFO page replacement algorithm. Assume memory of 'n' frames.

#include<stdio.h> #include<conio.h> int RefString[20],PT[10],nof,nor; void Accept() {     int i;     printf("Enter Reference String: \n");     for(i=0;i<nor;i++)     {         printf("[%d]=",i);         scanf("%d",&RefString[i]);     } } int Search(int s) {     int i;     for(i=0;i<nof; i++)         if(PT[i]==s)             return(i);     return(-1); } void FIFO() {     int i,j,k=0,Faults=0;     for(i=0;i<nor;i++)     {         gotoxy(3*i+1,2);         printf("%2d",RefString[i]);         if(Search(RefString[i])==-1)      ...