Page replacement algorithms are used in virtual memory management to decide which memory pages to swap out when a new page needs to be loaded and there are no free frames available. This visualization demonstrates how different algorithms handle page faults and memory allocation.
System requests a page from virtual memory
Check if page is in physical memory (valid bit)
If page is present, use it. If not, page fault occurs
If memory is full, select page to replace using algorithm
Load new page into freed frame
| Virtual Page | Valid Bit | Frame Number | Reference Bit | Last Access | Next Use (OPT) |
|---|
Access pages to see the page replacement algorithm in action.