知识卡片
CLOCK给予页面第二次机会
把缓冲区组成环,用时钟指针查候选。页面被访问就设置访问位;扫描到未被引用且访问位为 1 的页时清零并继续,下一圈仍为 0 才驱逐,正在引用的页跳过。与每次访问都更新链表相比,设置访问位和移动时钟手更适合并发。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 5. Transaction Processing and Recovery Page Replacement · 查看原书依据
CLOCK-sweep holds references to pages and associated access bits in a circular buffer. Some variants use counters instead of bits to account for frequency. Every time the page is accessed, its access bit is set to 1.
参考来源
- 位置:《Database Internals》Chapter 5. Transaction Processing and Recovery(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch05.html#idm46104532624440,段 70)
- 结论依据:第 69–76 段描述访问位、扫描判定与 CAS 实现的适用性。
- 原始内容:CLOCK-sweep holds references to pages and associated access bits in a circular buffer. Some variants use counters instead of bits to account for frequency. Every time the page is accessed, its access bit is set to 1.