Free Virtual memory lessonsVirtual memory · Stage 1 · Page replacement · Step 1
Choosing which page to evict
Compare FIFO, LRU and the optimal policy on a reference string, and see how far each is from the best. About 15 minutes.
Which page does the optimal policy evict?
- AThe one whose next use is farthest in the future, or never
- BThe one that has been in memory longest
- CThe one used longest ago
Show the answer
The one whose next use is farthest in the future, or never. That is the choice that postpones the next fault as long as possible.
4 questions on this idea
Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.
Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve