– 杂乱写 = = 看到哪写到哪

B+ Tree

M order

子指针的数目比元素个数多一

叶子:$\lceil M/2 \rceil to (M-1)$items


立即释放:可能不一致

封锁:可能死锁

避免饿死:事务申请锁时:1. 不冲突 2. 没有在其之前对数据Q等着加锁的事务

锁管理器可以避免饿死。


Buffer-Replacement Policies

当Buffer的空闲区不够,不能容下新读入的Block时,需要将Buffer中原有Block覆盖(替换)。主要策略:

A) LRU strategy (Least Recently Used,最近最少使用策略): Replace the block which was least recently used.

B) MRU strategy (Most recently used ,最近最常用策略)– system must pin the blockcurrently being processed. After thefinal tuple of that block has been processed, the block is unpinned, and itbecomes the most recently used block.

LRU can be a bad strategy

borrower |×| customer

设 M=5 (buffer has 5blocks), 1for borrower. , 3 for custumer. ,1 for out 对customer,LRU的块可能是下面快要用的块(循环),而最近刚用过的块则暂时不用,当空间不够时倒是可以将其覆盖的, 故LRU策略不佳