[cs33211] OS Project 2 Question

Mikhail Nesterenko mikhail at cs.kent.edu
Tue Nov 6 14:49:57 EST 2012


>
> I am slightly confused about what the algorithm does in case of a
> page hit.  For example, say all frames are filled and the last
> execution of the second chance algorithm ended at frame 2. There is
> a page hit in frame 8, so will the next execution of the second
> chance algorithm begin at frame 9 or frame 3? In short, do page hits
> affect what the starting frame for the next execution is?

In case of a page hit - the page's reference bit is set to one. 

The search for victim proceeds from the same place it stopped the
previous time. In your example, if the last time frame 2 was replaced,
the next time the second change algorithm starts selecting a victim
it proceeds from frame 3 (regardless of frame 8 page hit).

Thanks,
-- 
Mikhail


More information about the cs33211 mailing list