CS490_PROG2_FA11 - CS 490 OPERATING SYSTEMS PROGRAM 2 100...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 490 FALL 2011 OPERATING SYSTEMS PROGRAM 2 – 100 POINTS DUE 11/17/2011 PROBLEM DESCRIPTION Write a program to compare the performance of the LRU and FIFO page replacement algorithms. Test each of the algorithms for a range of resident set sizes. Use a pure demand fetch policy in which every page, including the first, is loaded as the result of a page fault. For each case keep track of the number of page faults generated and the page fault frequency , (number of page faults / total number of page references). GENERAL REQUIREMENTS 1. Implement FIFO and LRU algorithms using a linked list. You can implement the linked list anyway you choose. 2. For FIFO replacement the page at the head of the list represents the oldest page “in memory”, and the tail of the list is the newest page in memory. If a page reference causes a page fault the new page is linked to the tail of the list. If a page replacement is required (all frames are “full”) the page at the head of the list is removed. If a memory reference doesn’t cause a page fault there is no change to the list. 3. For Least Recently Used (LRU) the page at the head of the list is always the least recently used page in memory, and the tail of the list is the most recently used. If a page reference causes a page fault the new page is linked to the tail of the list. If a page replacement is required (all frames are
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

CS490_PROG2_FA11 - CS 490 OPERATING SYSTEMS PROGRAM 2 100...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online