Question: 1. Demonstrate various page replacement algorithms. Problem statement: In this project, among three page replacement algorithms: FIFO, Optimal (OPT) and LRU, you choose two page
1. Demonstrate various page replacement algorithms.
Problem statement:
In this project, among three page replacement algorithms: FIFO, Optimal (OPT) and LRU, you choose two page replacement algorithms to implement.
Input: Your program read from a text file which include:
1) A choice of a replacement algorithm (FIFO, OPT, and LRU)
2) A number of memory frames,
3) A reference string.
FIFO.txt: F,4,2,3,2,1,5,2,4,5,3,2,5,2
OPT.txt: O,3,1,2,1,3,1,4,1,5,1,6,1,7,1,8
LRU.txt: L,5,2,3,2,1,5,2,4,5,3,2,5,2
The first character in the string means the type of algorithm, e.g.: "F" means FIFO algorithm. The second character in the string means the number of memory frames, e.g.: "4" represents that the number of memory frames is 4. The rest is the reference string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
