onsider the following page reference string:
3, 8, 2, 9, 8, 2, 3, 9, 2, 8
3,8,2,9,8,2,3,9,2,8
A. FIFO
Ref | 3 | 8 | 2 | 9 | 8 | 2 | 3 | 9 | 2 | 8 |
F#1 | 3 | 3 | 3 | 9 | 9 | 9 | 9 | 9 | 9 | 9 |
F#2 | 8 | 8 | 8 | 8 | 8 | 3 | 3 | 3 | 3 | |
F#3 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 8 | ||
H/F | F | F | F | F | H | H | F | H | H | F |
Total number of page fault=6
B. RECENTLY USED
Ref# | 3 | 8 | 2 | 9 | 8 | 2 | 3 | 9 | 2 | 8 |
F#1 | 3 | 8 | 2 | 9 | 8 | 2 | 3 | 9 | 2 | 8 |
F#2 | 3 | 8 | 2 | 9 | 8 | 2 | 3 | 9 | 2 | |
F#3 | 3 | 8 | 2 | 9 | 8 | 2 | 3 | 9 | ||
H/F | F | F | F | F | H | H | F | F | H | F |
TOTAL NUMBER OF PAGE FAULT=7
C. OPTIMAL PAGE REPLACEMENT
Ref# | 3 | 8 | 2 | 9 | 8 | 2 | 3 | 9 | 2 | 8 |
F#1 | 3 | 3 | 3 | 9 | 9 | 9 | 9 | 9 | 9 | 8 |
F#2 | 8 | 8 | 8 | 8 | 8 | 3 | 3 | 3 | 3 | |
F#3 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | ||
H/F | F | F | F | F | H | H | F | H | H | F |
TOTAL NUMBER OF PAGE FAULT = 6
Algorithm FIFO and Optimal page replacement both performs equally well in this case.
But usually OptimalPage Replacement gives better performance.
If you are satisfied with answer please? upvote thanks....
Get Answers For Free
Most questions answered within 1 hours.