You need to implement the following page replacement algorithms and apply those on a small input dataset and the give file (the detail instruction is given in the next page):
LRU(Least recently Used)
The display should be in table for like this and have the number of page faults at the end. It doesn’t have to have the lines like the one below.
Page # |
1 |
2 |
3 |
4 |
1 |
2 |
5 |
1 |
2 |
3 |
4 |
5 |
|
1 |
1 |
1 |
1 |
|
|
5 |
5 |
5 |
5 |
4 |
4 |
|
|
2 |
2 |
2 |
|
|
2 |
1 |
1 |
1 |
1 |
5 |
|
|
|
3 |
3 |
|
|
3 |
3 |
2 |
2 |
2 |
2 |
|
|
|
|
4 |
|
|
4 |
4 |
4 |
3 |
3 |
3 |
Number of page fault: 10
I will include the data input file that it is suppose to read from and do the calculations for.