Download presentation
Presentation is loading. Please wait.
Published byEthan Matthews Modified over 9 years ago
1
1 Project: Page Replacement Algorithms Lubomir Bic
2
2 Project Description Objective: compare performance of different page replacement algorithms A page replacement algorithm: –At page fault, determines which currently resident page must be evicted and replaced by a new page –Main goal: minimize number of page faults over a period of time Global page replacement: –All resident pages are considered, regardless of who caused the page fault
3
Project Description To compare performance of different algorithms, we use reference string, RS: r 1 r 2 … r T –each r i is an integer –it represents the page accessed at time i Operating Systems 3
4
Project Description Assignment: implement and compare –FIFO, LRU, Second Chance Algorithm You will be given a RS in the form of a file Your program must determine (for each algorithm): –number of page faults –the times of their occurrence Output format: N t 1 t 2 … t N –N: total number of page faults for the given RS –each t i represents the time of a page fault Operating Systems 4
5
Protocol for Testing See lab assistant due date Bring your own laptop (or use a lab computer) Your program must be able to –read text files (.txt extension) from a USB memory –write text files to the same memory stick Operating Systems 5
6
Protocol for Testing During test: –create a PM consisting of 16 page frames –initialize PM such that frame i contains the page i –for each algorithm: read RS from file input.txt on memory stick output results into a file nnn.txt, where nnn is your matriculation number, to the same memory stick –output file should contain 3 separate lines of the form N t 1 t 2 … t N – Operating Systems 6
7
Example Input file: 3 0 1 20 1 0 1 … Output file: 3 4 6 7 … 1 4 … 2 4 6 … Operating Systems 7
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.