CPU Scheduler Simulator - Online FCFS, SJF, Round‑Robin
Enter processes and see how different scheduling algorithms handle them. Gantt chart generation. OS course helper.
UD5 Toolkit
Simulate FIFO, LRU & Optimal page replacement algorithms with step-by-step visualization
A page replacement algorithm is used by an operating system's virtual memory manager to decide which memory page to evict when a new page needs to be loaded and all frames are full. The goal is to minimize page faults — situations where the requested page is not in memory and must be fetched from disk, which is significantly slower.
FIFO replaces the page that has been in memory the longest. It maintains a queue of loaded pages. When a page fault occurs and all frames are full, the page at the front of the queue is evicted. While simple to implement, FIFO suffers from Belady's Anomaly — increasing the number of frames can sometimes increase the number of page faults.
LRU replaces the page that hasn't been accessed for the longest time. It's based on the principle of temporal locality — recently used pages are likely to be used again soon. LRU generally performs better than FIFO but requires tracking access timestamps, making it more complex to implement in hardware. LRU does not suffer from Belady's Anomaly.
The Optimal (OPT or MIN) algorithm replaces the page that will not be used for the longest time in the future. It guarantees the minimum possible number of page faults for a given reference string and frame count. However, it requires future knowledge of the reference string, making it impossible to implement in practice. It serves as a theoretical benchmark to evaluate other algorithms.
Belady's Anomaly is a counterintuitive phenomenon where increasing the number of available frames actually increases the number of page faults for the FIFO algorithm with certain reference strings. This anomaly does not occur with stack-based algorithms like LRU and Optimal. The classic example reference string 1,2,3,4,1,2,5,1,2,3,4,5 with 3 vs 4 frames demonstrates this effect.
Efficient page replacement is critical for system performance because page faults incur significant latency (accessing disk is ~100,000Ă— slower than RAM). Modern operating systems use approximations of LRU (like the Clock algorithm) that balance performance with implementation complexity. Understanding these algorithms is fundamental to OS design, database buffer management, and cache systems.
The table shows the state of memory frames after each page reference. The top row shows the reference string with color coding (red = page fault, green = hit). Each subsequent row represents a frame, showing which page it holds at each step. Cells with orange background indicate a page just loaded due to a page fault. Green cells indicate a hit. The bottom indicator row shows PF for page faults and âś“ for hits.
Enter processes and see how different scheduling algorithms handle them. Gantt chart generation. OS course helper.
Drag a battery, resistor, LED onto a grid and simulate current flow. Show Ohm's law in action.
Set a cron expression and see a calendar of the next 1,000 execution times. Never miss a schedule again.
Input telescope and eyepiece parameters to see a simulated view of the Moon or Andromeda. Plan observations.
Assign an ICC profile to an image and simulate how it would look on another device. For accurate color workflows. Local.
Enter your FAQ questions and answers, and get ready‑to‑paste JSON-LD structured data. Boost search appearance.
Enter item dimensions and find the smallest rectangular box that can fit them (simple packing heuristic). Helps reduce shipping costs. Local algorithm.
Calculate large Fibonacci numbers in a Web Worker. See the UI remain responsive. Copy the pattern for your app.
Open many parallel WebSocket connections and send messages. Test your server's concurrency. All from your browser.
Run the classic FizzBuzz with custom rules. See the output for any range. A beginner programmer's playground.
Create a Review or aggregateRating structured data. Perfect for star ratings in search results. Copy the code.
Paste a passage and automatically remove every nth word to create a fill‑in‑the‑blank exercise. For teaching and self‑study.
Select project type and leather weight to get recommended stitch spacing and thread size.
Create a tailored cover letter based on job title, your skills, and a template. Download as text or PDF print. Private.
Experience the four stages of rock tumbling virtually. Start with rough stones and watch them polish over 'days'. Satisfying.
Test prompt formatting without calling an LLM. See how your prompt would look with different templates. Dev tool.
Calculate load capacitors for a crystal oscillator given stray capacitance and crystal CL. Essential for microcontroller circuit design. Local.
Select telescope and eyepiece parameters to see the field of view circle on a simulated night sky image.
Generate an Article or BlogPosting structured data with headline, author, and image. For rich blog results.
Adjust letter‑spacing and word‑spacing with a slider and see the effect on a sample paragraph. Copy the CSS.
Create a foreboding dungeon name for your next D&D adventure. With optional adjective and location. Pure fantasy fun.
Float an image and wrap text around a non‑rectangular shape. Adjust shape‑margin. Copy the CSS. For magazine‑style web.
Simulate paint colors on a pre-loaded room photo by adjusting hue, saturation. Find your perfect shade before buying. Local canvas.
Split a text into an array of individual characters, ready to paste into code. Options for quotes and newlines.
Browse thousands of Unicode characters, search by name or code, and copy symbols to clipboard. Supports emojis, arrows, and math symbols.
Generate a plausible technical blog post title. Useful for practice writing or placeholder content. All local.
Input any JavaScript object and see if structuredClone can deep‑copy it. Compare with JSON.parse/stringify. Learn transferables.
Generate a sheet of random arithmetic problems (+, -, Ă—, Ă·) with configurable digits. For kids and brain training.
Ask a yes/no question and click to reveal a classic Magic 8-Ball response. Animated shake effect. Nostalgic fun, pure local randomness.
Create a Product structured data with reviews, price, and availability. Boost your ecommerce visibility in search.