โ† 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
Ref7
F17
F2
F3
ResultF

Page 7: fault, loaded into a free frame. So far: 1 faults, 0 hits. Total for LRU: 12 faults.

โœ… Check yourself (2 of 3 to pass)

1. Which algorithm gives the fewest page faults but cannot be built in practice?
2. Belady's anomaly (more frames, more faults) can happen with:
3. A page fault happens when:
Next: Deadlock avoidance: Banker's algorithm โ†’Get a free certificate in Operating Systems