LRU Page Replacement Algorithm

Speed: Normal

Memory State Visualization

Step: 0 / 0

Page Reference String:

The sequence of page numbers that are being requested by processes in the system.

Memory Frames:

Memory frames represent the physical memory available for page allocation. When a page is referenced, it's loaded into a frame if not already present.
Hit
New Page
Replacement
LRU

Current Status

Current Page: -
Number of Hits: 0
Page Faults: 0
Success Rate: 0%
Failure Rate: 0%
LRU Order:

Status:

Click "Next" to start the algorithm.

Action History:

Algorithm Explanation

The Least Recently Used (LRU) algorithm replaces the page that has not been used for the longest period of time when a new page needs to be loaded and all frames are full.

How it works:

  • When a page is referenced, it's checked if it's already in memory.
  • If the page is in memory, it's marked as "most recently used".
  • If not in memory and there's a free frame, the page is loaded there.
  • If all frames are full, the least recently used page is replaced.
  • The algorithm maintains an ordering of pages by recency of use.

The LRU algorithm performs well in practice but requires additional hardware support to efficiently track page usage.