技术2:减小锁的粒度。
在这种情况下,锁的粒度是非常重要的。
并且由于每一行都被存储在固定的位置,使得锁升级这样的技术得以实现,以避免过多细粒度锁。
And the location of every row is in a fixed location, allowing for techniques such as lock escalation when too many fine-grained locks would otherwise be needed.
例如,在财务系统中的客户级别上:一个粗粒度锁会锁定该客户的所有帐户,另一个锁则可锁定全部保险策略。
An example might be at the customer level in a financial system: one coarse grained lock could be to lock all accounts for the customer, another could be to lock all insurance policies.
本文采用了一个叫做动态多粒度锁的管理机制,提出了一种与之相适应的并发控制协议。
In this paper a management mechanism called dynamic multi - grain lock and a related concurrency control protocol were given.
锁升级是将许多较细粒度的锁转换成数量更少的较粗粒度的锁的过程,这样可以减少系统开销,但却增加了并发争用的可能性。
Lock escalation is the process of converting many fine-grain locks into fewer coarse-grain locks, reducing system overhead while increasing the probability of concurrency contention.
接着,从锁的角度和并发度的分析,提出能够满足实际需求的两种粒度锁——文档锁和路径锁。
Then, the two granularity locks, document-lock and path-lock, are proposed to meet the actual needs, by analyzing from the perspective of the lock and the data concurrence.
接着,从锁的角度和并发度的分析,提出能够满足实际需求的两种粒度锁——文档锁和路径锁。
Then, the two granularity locks, document-lock and path-lock, are proposed to meet the actual needs, by analyzing from the perspective of the lock and the data concurrence.
应用推荐