Page replacement algorithm simulator
Enter a page reference string and number of frames and see each step of FIFO, LRU and Optimal replacement, with page faults and hit ratio side by side.
- Free
- No sign-up
- Works on any device
About Page replacement algorithm simulator
Virtual memory systems must decide which page to evict when every frame is full. This simulator runs the same reference string through FIFO, which removes the oldest page; LRU, which removes the page unused for longest; and Optimal, which removes the page needed farthest in the future and serves as a benchmark. For each algorithm it shows the contents of every frame after every reference, marks faults and hits, and totals faults and hit ratio. The textbook string 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 with 3 frames gives 15, 12 and 9 faults.
How to use Page replacement algorithm simulator
- Type the page reference string using spaces or commas between pages.
- Set the number of frames, from 1 to 10.
- Compare the summary table, then follow each algorithm's frame table column by column.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
What is Belady's anomaly?
With FIFO, giving a process more frames can sometimes cause more page faults. The string 1 2 3 4 1 2 5 1 2 3 4 5 gives 9 faults with 3 frames and 10 with 4, and the page points it out when it happens.
Why does Optimal always do best?
It looks at future references to evict the page needed farthest away, which minimises faults. Real systems cannot see the future, so it is used only as a lower bound for comparison.
How are ties handled in Optimal?
When several pages are never used again, the one loaded earliest is replaced. Textbooks sometimes break ties differently, which can change the frame table but not the fault total.
Is Page replacement algorithm simulator free?
Yes. Page replacement algorithm simulator on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.