Sequence: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
Frame Size: 3
Number of References: 20
Blue is the sequence
Red is the replaced value when page fault occurs
Method 1: First In First Out (FIFO)
7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
7 7 7 2 2 2 2 4 4 4 0 0 0 0 0 0 0 7 7 7
- 0 0 0 0 3 3 3 2 2 2 2 2 1 1 1 1 1 0 0
- - 1 1 1 1 0 0 0 3 3 3 3 3 2 2 2 2 2 1
Number of Hits: 5
Page Faults: 15
Hit Rate: 25.0%
Method 2: Least Recently Used (LRU)
7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
7 7 7 0 1 2 2 3 0 4 2 2 0 3 3 1 2 0 1 7
- 0 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0
- - 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
Number of Hits: 8
Page Faults: 12
Hit Rate: 40.0%
Method 3: Optimal Page Replacement (OPT)
7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
7 7 7 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 7 7
- 0 0 0 0 0 0 4 4 4 0 0 0 0 0 0 0 0 0 0
- - 1 1 1 3 3 3 3 3 3 3 3 1 1 1 1 1 1 1
Number of Hits: 11
Page Faults: 9
Hit Rate: 55.0%