Page Address Stream: F Page Fault Occurring After The Frame Allocation Is Initially Filled

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Page address

stream 2 3 2 1 5 2 4 5 3 2 5 2

2 2 2 2 2 2 4 4 4 2 2 2
OPT 3 3 3 3 3 3 3 3 3 3 3
1 5 5 5 5 5 5 5 5
F F F

2 2 2 2 2 2 2 2 3 3 3 3
LRU 3 3 3 5 5 5 5 5 5 5 5
1 1 1 4 4 4 2 2 2
F F F F

2 2 2 2 5 5 5 5 3 3 3 3
FIFO 3 3 3 3 2 2 2 2 2 5 5
1 1 1 4 4 4 4 4 2
F F F F F F

2* 2* 2* 2* 5* 5* 5* 5* 3* 3* 3* 3*
CLOCK 3* 3* 3* 3 2* 2* 2* 2 2* 2 2*
1* 1 1 4* 4* 4 4 5* 5*
F F F F F

F = page fault occurring after the frame allocation is initially filled

Figure 8.15 Behavior of Four Page-Replacement Algorithms


40
Page Faults per 1000 References

FIFO
35
30 CLOCK

25 LRU
20
OPT
15
10
5
0
6 8 10 12 14

Number of Frames Allocated

Figure 8.17 Comparison of Fixed-Allocation, Local Page Replacement Algorithms


First frame in
circular buffer of
n–1 0 frames that are
candidates for replacement
page 9 page 19 1
use = 1 use = 1
page 1
• use = 1

next frame page 45 2
• pointer use = 1

page 222 page 191


use = 0 use = 1 3
8

page 33 page 556


use = 1 use = 0
page 67 page 13
7 use = 1 use = 0 4

6 5
(a) State of buffer just prior to a page replacement

n–1 0

page 9 page 19 1
use = 1 use = 1
page 1
• use = 1

page 45 2
• use = 0

page 222 page 191


8 use = 0 use = 0 3

page 33 page 727


use = 1 use = 1
page 67 page 13
7 use = 1 use = 0 4

6 5
(b) State of buffer just after the next page replacement

Figure 8.16 Example of Clock Policy Operation

You might also like