Write a program in C no gui and implement a virtual memory simulator based on De
ID: 3649714 • Letter: W
Question
Write a program in C no gui and implement a virtual memory simulator based on Demand Paging.The following algorithms will be implemented: FIFO, OPT and LRU.
We will simulate the execution of each of these algorithms on a hypothetical computer having only four physical frames (numbered from 0 to 3), assuming that the single process that is running has a virtual memory of eight frames (numbered from 0 to 7).
The algorithms will be simulated based on a reference string (a sequence of pages that are to be accessed) that will be either read from the keyboard or randomly generated.
The program will be menu-based and the menu will have the following options:
0
Explanation / Answer
#include void FIFO(char [],char [],int,int); void lru(char [],char [],int,int); void opt(char [],char [],int,int); int main() { int ch,YN=1,i,l,f; char F[10],s[25]; clrscr(); //system("clear"); printf(" Enter the no of empty frames: "); scanf("%d",&f); printf(" Enter the length of the string: "); scanf("%d",&l); printf(" Enter the string: "); scanf("%s",s); for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.