โ CS Visual Lab ยท Operating Systems
๐ Page replacement
๐ก The ideaRAM has a few frames. When a needed page is not in RAM (a page fault) and all frames are full, one page must leave. FIFO removes the oldest, LRU removes the least recently used, Optimal removes the one needed farthest in the future.
๐ In real lifeYour study table holds 3 books. When you need a 4th, you put one back on the shelf: the one you took out first (FIFO), the one you have not opened for longest (LRU), or the one you will not need until next week (Optimal).
๐ฌ Watch it work
Step 1 of 20
| Ref | 7 |
|---|---|
| F1 | 7 |
| F2 | |
| F3 | |
| Result | F |
Page 7: fault, loaded into a free frame. So far: 1 faults, 0 hits. Total for LRU: 12 faults.