Clock replacement algorithm

A site visit is, B is modified bit.

1. When A = 0, M = 0. It represents neither be accessed nor modified. It is the best out of the page.

2. When A = 0, M = 1. But the visit did not represent modified. Not very good out of the page.

3. When A = 1, M = 0. It indicates access, and no changes. There may be accessed again.

4. When A = 1, M = 1. Access and modify. There may be accessed again.

A, first find A = 0, M = 0 is. And first encountered as a page out of the selected page. The first does not change the access site during a scan A.

Second, the failure of the first step A = 0, M = 1 as a page out. During the second round of scanning all the scanned pages accessible location 0.

Third, the pointer back to the original position, all the visited location 0. The first step is then repeated (Get A = 0, M = 0) fails repeat step (A = 0, M = 1)

Reduce disk I / O operations wash. But probably after several rounds of scanning, which can remove the overhead of the algorithm itself has increased.

Guess you like

Origin www.cnblogs.com/claudia529/p/12088532.html
Recommended