spring08_homework3B_Solutions

spring08_homework3B_Solutions - RS a b g a d e a b a d e g...

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

View Full Document Right Arrow Icon
Homework 3B (30 Points) CS 143A, Spring 2008 Start Early. Do not hesitate to ask questions. If you make any assumptions, state them and be brief in your answers. Hand in your homework to the distribution center before the following due  date/time. Due Date: 6/6/08 Friday 4pm Question 1 (20 points):  Consider the following page reference string: a, b, g, a, d, e, a, b, a, d, e, g, d, e, a, b, c, d, a, b How many page faults would occur for the following replacement algorithms, assuming four frames?  Remember that all frames are initially empty, so your first unique pages will all cost one fault each.  LRU Time 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 RS a b g a d e a b a d e g d e a b c d a b Frame 0 a a a a a a a a a a a a a a a a a a a a Frame 1 b b b b e e e e e e e e e e e e d d d Frame 2 g g g g g b b b b g g g g b b b b b Frame 3 d d d d d d d d d d d d c c c c IN a b g d e b g b c d OUT b g b g d e Total Faults:  10
Background image of page 1

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

View Full DocumentRight Arrow Icon
MIN Time 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: RS a b g a d e a b a d e g d e a b c d a b Frame 0 a a a a a a a a a a a a a a a a a a a a Frame 1 b b b b b b b b b b g g g g b b b b b Frame 2 g g g e e e e e e e e e e e c c c c Frame 3 d d d d d d d d d d d d d d d d IN a b g d e g b c OUT g b g e Total Faults: 8 Note: At column 16, either page g or e could be replaced. For column 17, whichever is left must be picked (of g or e). . Question 2 (10 points): Consider the following reference string: a,b,c,d,a,b,e,a,b,c,d,e Determine the number of page faults generated using a FIFO page replacement scheme for a number of frames ranging from 1 to 6. Illustrate Belady's anomaly by plotting the number of page faults against the number of frames....
View Full Document

Page1 / 3

spring08_homework3B_Solutions - RS a b g a d e a b a d e g...

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

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