Unit 4 Part 3
Unit 4 Part 3
Frames 3 2 1 3 4 1 6 2 4 3 4 2 1 4 5 2 1 3 4
0 3 3 3 3 4 4 4 4 4 3 3 3 3 3 5 5 5 5 4
1 2 2 2 2 2 6 6 6 6 4 4 4 4 4 2 2 2 2
2 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 3 3
Page * * * * * *
Hit
- Page which has not been used for the longest time is replaced.
FRAME 3 2 1 3 4 1 6 2 4 3 4 2 1 4 5 2 1 3 4
0 3 3 3 3 3 3 6 6 6 3 3 3 1 1 1 2 2 2 4
1 2 2 2 4 4 4 2 2 2 2 2 2 2 5 5 5 3 3
2 1 1 1 1 1 1 4 4 4 4 4 4 4 4 1 1 1
Page * * * * *
Hit
- Replace the page that will not be used for the longest time.
- Has the lowest page fault.
FRAME 3 2 1 3 4 1 6 2 4 3 4 2 1 4 5 2 1 3 4
0 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3
2 1 1 1 1 6 6 6 3 3 3 1 1 1 1 1 1 4
Page * * * * * * * * *
Hit
1
Frames 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
0 1 1 1 4 4 4 4 6 6 6 6 3 3 3 3 2 2 2 2 6
1 2 2 2 2 1 1 1 2 2 2 2 7 7 7 7 1 1 1 1
2 3 3 3 3 5 5 5 1 1 1 1 6 6 6 6 6 3 3
Page * * * *
Hit
- Page which has not been used for the longest time is replaced.
FRAME 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
0 1 1 1 4 4 4 5 5 5 1 1 1 7 7 7 2 2 2 2 2
1 2 2 2 2 2 2 6 6 6 6 3 3 3 3 3 3 3 3 3
2 3 3 3 1 1 1 2 2 2 2 2 6 6 6 1 1 1 6
Page * * * * *
Hit
- Replace the page that will not be used for the longest time.
- Has the lowest page fault.
-
FRAME 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
0 1 1 1 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 6
1 2 2 2 2 2 2 2 2 2 2 2 7 7 7 2 2 2 2 2
2 3 4 4 4 5 6 6 6 6 6 6 6 6 6 1 1 1 1
Page * * * * * * * * *
Hit
Frames 1 2 3 4 5 5 3 4 1 6 7 8 7 8 9 7 8 9 5 4 5 4 2
0 1 1 1 1 5 5 5 5 5 5 5 8 8 8 8 8 8 8 8 8 8 8 2
1 2 2 2 2 2 2 2 1 1 1 1 1 1 9 9 9 9 9 9 9 9 9
2 3 3 3 3 3 3 3 6 6 6 6 6 6 6 6 6 5 5 5 5 5
3 4 4 4 4 4 4 4 7 7 7 7 7 7 7 7 7 4 4 4 4
Page * * * * * * * * * *
Hit
- Page which has not been used for the longest time is replaced.
Frames 1 2 3 4 5 5 3 4 1 6 7 8 7 8 9 7 8 9 5 4 5 4 2
0 1 1 1 1 5 5 5 5 5 6 6 6 6 6 6 6 6 6 5 5 5 5 5
1 2 2 2 2 2 2 2 1 1 1 1 1 1 9 9 9 9 9 9 9 9 9
2 3 3 3 3 3 3 3 3 7 7 7 7 7 7 7 7 7 4 4 4 4
3 4 4 4 4 4 4 4 4 8 8 8 8 8 8 8 8 8 8 8 2
Page * * * * * * * * * *
Hit
Q7. Consider the following page reference string 5,4,3,2,1,4,3,5,4,3,2,1,5. How many page
faults would occur assuming three frames are made available for FIFO page replacement
algorithm? Would the FIFO page replacement algorithm suffer from Belady’s Anomaly if
number of frames increase from three to four? Justify.