[cs33211] Re: Project 2, correct output?

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Apr 8 22:08:24 EDT 2009


> 
> Regarding the following 3 lines of output from a past e-mail you fwd'd  
> to us:
> 
> " page miss, page 81 is in frame 9
>    page hit,  page 59 is in frame 0
>   page miss, page 9 is in frame 1 "
>
> Would page 9 be allocated to frame 0 or 1 since it didn't actually go  
> back to 0 yet...or did it once the pointer to the next frame goes back?


In the previous example the "hand" of the clock (the pointer to the
next page to be considered) is pointing to frame 0 (page 59). Then
there is a page hit on 59 that sets the bit. The hand clears the bit
and goes to the next frame (frame 1) where this bit is not set. This
cause the eviction of the page from that frame and its replacement
with page 9.
> 
> My output looks like this:
> "81: page miss, page 81 is in frame 9
> 59: page hit, page 59 is in frame 0
> 9: page miss, page 9 is in frame 0"

Does not look correct, see explanation above.
--
Mikhail


More information about the cs33211 mailing list