ajay-dhangar / algo

This repository contains a collection of data structures and algorithms implemented in various programming languages. It is designed to help learners understand key concepts through hands-on examples. Contributions and improvements are welcome!
https://ajay-dhangar.github.io/algo/
MIT License
70 stars 231 forks source link

[Idea]: <Your idea title>Add page replacement algorithms #1554

Closed Ananya-vastare closed 1 week ago

Ananya-vastare commented 2 weeks ago

Idea Title

Add page replacement algorithms

Idea Description

Page replacement algorithms are essential in operating systems for managing memory when physical RAM cannot accommodate all active pages. They determine which pages to evict when new ones need to be loaded. Common algorithms include Least Recently Used (LRU), which replaces the least recently accessed page; First-In, First-Out (FIFO), which evicts the oldest page; and Optimal Page Replacement, which removes the page that won't be used for the longest time. Each algorithm has its pros and cons, with LRU often being more efficient than FIFO but more complex to implement. Understanding these algorithms is crucial for optimizing memory usage and reducing page faults.

Potential Benefits

Implementation Suggestions (Optional)

No response

Ananya-vastare commented 2 weeks ago

@ajay-dhangar please assign this issue to me thank you