知识卡片
FIFO与LRU的差异
FIFO 只记装入先后,根页即使被不断访问也可能最先出队,容量增大也不保证更少缺页。LRU 每次重访都延长该页驻留,但更新共享链表在高并发下有成本。2Q 先让首次访问页入试用队列,重访再转热队列;LRU-K 用最近 K 次访问判断是否反复命中。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 5. Transaction Processing and Recovery Page Replacement · 查看原书依据
A natural extension of the FIFO algorithm is least-recently used (LRU) [TANENBAUM14]. It also maintains a queue of eviction candidates in insertion order, but allows you to place a page back to the tail of the queue
参考来源
- 位置:《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#idm46104532626856,段 66)
- 结论依据:第 63–67 段用根页说明 FIFO 局限,并引入 2Q 与 LRU-K。
- 原始内容:A natural extension of the FIFO algorithm is least-recently used (LRU) [TANENBAUM14]. It also maintains a queue of eviction candidates in insertion order, but allows you to place a page back to the tail of the queue