homework_9.13 Version 0 |
|
👤 Author: by 2014329600146fyh 2016-12-13 12:01:49 |
The work way of Second-chance (clock) page-replacement algorithm.
One way to implement the second-chance algorithm (sometimes referred to as the dock algorithm) is as a circular queue. A pointer (that is, a hand on the clock) indicates which page is to be replaced next. When a frame is needed, the pointer advances until it finds a page with a 0 reference bit. As it advances, it clears the reference bits. Once a victim page is found, the page is replaced, and the new page is