Saturday, June 29, 2013

Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. How many page faults would occur for the FIFO replacement? Remember all frames are Initially empty, so your first unique pages will all cost one fault each.



For FIFO replacement algorithm:
:: for 3 page frames
Request
1
2
3
4
2
1
5
6
2
1
2
3
7
6
3
2
1
2
3
6
page frames
1*
1
1
4*
4
4
4
6*
6
6
6
3*
3
3
3*
2*
2
2*
2
6*

2*
2
2
2*
1*
1
1
2*
2
2*
2
7*
7
7
7
1*
1
1
1


3*
3
3
3
5*
5
5
1*
1
1
1
6*
6
6
6
6
3*
3
Page fault
No
No
No
No

:: for 5 page frames
Request
1
2
3
4
2
1
5
6
2
1
2
3
7
6
3
2
1
2
3
6
Page frames
1*
1
1
1
1
1*
1
6*
6
6
6
6
6
6*
6
6
6
6
6
6*

2*
2
2
2*
2
2
2
2*
1*
1
1
1
1
1
1
1*
1
1
1


3*
3
3
3
3
3
3
3
2*
2
2
2
2
2*
2
2*
2
2



4*
4
4
4
4
4
4
4
3*
3
3
3*
3
3
3
3*
3






5*
5
5
5
5
5
7*
7
7
7
7
7
7
7
Page fault
No
No
No
no
no
no
no
no
no
No


:: for 7 page frames
Request
1
2
3
4
2
1
5
6
2
1
2
3
7
6
3
2
1
2
3
6
Page frames
1*
1
1
1
1
1*
1
1
1
1*
1
1
1
1
1
1
1*
1
1
1

2*
2
2
2*
2
2
2
2*
2
2*
2
2
2
2
2*
2
2*
2
2


3*
3
3
3
3
3
3
3
3
3*
3
3
3*
3
3
3
3*
3



4*
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4






5*
5
5
5
5
5
5
5
5
5
5
5
5
5







6*
6
6
6
6
6
6*
6
6
6
6
6
6*












7*
7
7
7
7
7
7
7
Page fault
No
No
no
No
no
No
no
No
no
no
no
no
no

Page Frame
Page fault
3
16
5
10
7
7

No comments:

Post a Comment