Bölüm 9 · Simülatör

Page Replacement

← Bölüm 9
Frames 3
Speed 1.5/s

✗ Faults 0 ✓ Hits 0 Hit rate – Step 0/0

Page Replacement

A process references pages in the order of the reference string. A referenced page that is already in a frame is a hit; otherwise it is a page fault and the page is loaded. When all frames are full, the replacement algorithm chooses a victim page to evict. The grid shows the frames after every reference, the strip below shows the algorithm's state (who goes out next).

How to use

  • Choose an algorithm and the number of frames (1–8).
  • Type a reference string (up to 40 pages, separated by spaces) or pick a preset.
  • Play, step, or click a reference in the top row of the grid to jump to that step.
  • Compare shows the faults of all algorithms and FIFO faults for 1–6 frames (Belady's anomaly).

Algorithms

FIFO
Evict the page loaded earliest.
OPT
Evict the page used farthest ahead (needs the future; a lower bound).
LRU
Evict the least recently used page.
LFU
Evict the lowest count; tie: least recent. Count resets on eviction.
Clock
R=1: clear and skip (second chance). Evict first R=0. Load sets R=1.

Legend

✓ hit ↓ loaded (fault) next out ↑7 evicted

Badges

#1
FIFO queue position (1 = oldest)
−2
LRU: last used 2 steps ago
×3
LFU: reference count
+4
OPT: next use in 4 steps (∞ never)
R1
Clock reference bit

Keys

←→ stepSpace playHomeEnd first / lastEsc close