Comparative Study - Simulation of Page Replacement Algorithms
Comparative Simulation of Page Replacement Algorithms 1. Aim To simulate and compare the performance of: FIFO LRU LFU Random Optimal using a randomly generated page reference string with 3 page frames , and to calculate: Total Hits Total Misses Hit Rate 2. Objective To understand different page replacement strategies To compare performance of various algorithms To observe that Optimal gives minimum page faults To analyze hit rate differences 3. Theory When a process executes, pages are loaded into memory frames. If a page is not in memory, a page fault occurs. Different page replacement algorithms decide which page to remove when memory is full. Algorithms Used: 1️⃣ FIFO (First In First Out) Replaces the oldest page in memory. Simple queue-based approach. May suffer from Belady’s anomaly . 2️⃣ LRU (Least Recently Used) Replaces the page that has not been used for the longest time. Uses past reference inform...