Skip to content

ILoveBacteria/page-replacement-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page Replacement Algorithms

License: MIT Issues Forks Stars Watchers Last commit Workflow Workflow

Description

This is my OS course project.

This repository contains an implementation of three popular page replacement algorithms: First-In-First-Out (FIFO), Least Recently Used (LRU), and Second Chance. These algorithms are commonly used in operating systems to manage memory allocation and ensure that the most frequently accessed pages are kept in memory, while less frequently used pages are swapped out to disk.

The code is written in a modular and extensible way, allowing for easy integration into existing systems or for use as a standalone library. Each algorithm is implemented as a separate class, with a consistent interface that allows for easy swapping between them.

The FIFO algorithm simply replaces the oldest page in memory when a new page needs to be loaded. LRU keeps track of the least recently used pages and replaces the one that has not been accessed for the longest time. Second Chance is similar to FIFO, but gives each page a "second chance" before being replaced if it has been accessed recently.

About

My OS course final project. An implementation of three page replacement algorithms: FIFO, LRU, Second Chance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages