Skip to content

jathinsurya/Page-Replacement-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page Replacement Algorithms Simulator

Overview

This project is a simulation of page replacement algorithms used in Operating Systems to manage virtual memory.
When a page fault occurs and memory frames are full, the OS must decide which page to replace.
This simulator demonstrates how different algorithms make that decision.

The program provides a step-by-step visualization of memory frames, clearly showing page hits and page faults.

Algorithms Implemented

  • FIFO (First In First Out)
  • LRU (Least Recently Used)
  • Optimal Page Replacement

Data Structures Used

  • Arrays – page frames and reference string
  • Counters / index tracking – FIFO
  • Time-stamp logic – LRU
  • Greedy strategy – Optimal algorithm

Features

  • User-defined number of memory frames
  • Custom page reference string input
  • Step-by-step frame state after each page request
  • Page HIT / FAULT identification
  • Total page fault calculation for each algorithm
  • Clear comparison of algorithm behavior

Sample Output (Conceptual)

Page 7 -> 7 - - FAULT Page 0 -> 7 0 - FAULT Page 1 -> 7 0 1 FAULT Page 0 -> 7 0 1 HIT Page 2 -> 2 0 1 FAULT

About

A C-based simulator implementing FIFO, LRU, and Optimal page replacement algorithms with step-by-step memory frame visualization and page fault analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages