The Optimal Algorithm (OPT)
Assumes knowing the future.
Can you think of it?
Replace the page that will not be used for the longest period of time.
1 2 3 4 1 2 5 1 2 3 4 5
1
1
2
1
2
3
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
5
1
2
3
5
1
2
3
5
1
2
3
5
4
2
3
5
4
2
3
5
f
f
f
f
f
f
Previous slide
Next slide
Back to first slide
View graphic version