aa3 - misses on a cache of size i on algorithm A . (For a...

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

View Full Document Right Arrow Icon
Problem Set 3 Due: March 28 cs2me3 Winter 2007 Instructions 1. You are encouraged to work in groups of two. If you cannot find a partner, you can work alone. 2. Please submit one copy of the assignment; if you are working with a partner, both names should appear on the assignment. 3. For Part A of the assignment, you must submit an electronic copy of your Java appli- cation via WebCT (by the time of the lecture on the due date of the assignment). Part A Write a program which does the following experiment: on input m, n, k it creates a random list of m requests, where each request is from among [ n ] = { 1 , 2 , . . . , n } pages of memory, and it counts the number of misses on a cache of size i k of each of the following page replacement algorithms: LRU, CLOCK, FIFO, LIFO, LFU, LFD 1 , and plots the result. In other words, for each 0 < i k it draws a point in position ( i, misses A ( i )), the number of
Background image of page 1

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

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

Unformatted text preview: misses on a cache of size i on algorithm A . (For a better visual eect, plot the outcome of each algorithm in a dierent color, and provide a legend.) 1 See page 43 of the notes for the description of these algorithms. 1 Part B 1. For a general i , provide a sequence of page requests that illustrates Beladys Anomaly incurred by FIFO on cache sizes i and i + 1. In your analysis, assume that the cache is initially empty. 2. Show that FWF is a marking algorithm, and that FIFO is not a marking algorithm. 3. We say that a page replacement algorithm ALG is conservative if it satises the fol-lowing condition: On any consecutive input subsequence containing k or fewer distinct page requests, ALG will incur k or fewer page faults. Prove that LRU and FIFO are conservative, but FWF is not. 2...
View Full Document

Page1 / 2

aa3 - misses on a cache of size i on algorithm A . (For a...

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