发明名称 Method and apparatus that utilizes state locks to lock resources
摘要 Method and apparatus for locking by sharing lock states. Each resource is associated with a lock state that represents its lock. Lock states are made of one set of transactions per locking mode. Resources may share the same lock state if the state of their respective locks is equal. Locking operations change the association between a resource and a lock state to reflect changes to the resource's lock. In one embodiment, a table of immutable lock states (TILS) record the immutable lock states that were created by lock operations in order to avoid duplication of lock states with equal value. Locking operations (acquire and release) on a resource R by a transaction T compute a new lock state value by adding (acquire) or removing (release) T from the lock state associated with R, consult the TILS to retrieve an immutable lock state corresponding to the computed value (and registers one if none was found), and change R's association to refer to the lock state returned by the TILS. In one embodiment, lock state computations are cached to avoid both computation of lock states and look up to the TILS. Each transaction maintains one lock state computation cache per locking operation. Transactions keep track of resources they obtain a lock for using a lock set (which may be implemented as a stack). Alternatively, lock sets may be avoided if the TILS is scanned upon transaction completion to determine the lock states that contained the transaction in one of their sets.
申请公布号 US6343339(B1) 申请公布日期 2002.01.29
申请号 US20000693354 申请日期 2000.10.20
申请人 SUN MICROSYSTEMS, INC. 发明人 DAYNES LAURENT
分类号 G06F9/46;(IPC1-7):G06F13/00 主分类号 G06F9/46
代理机构 代理人
主权项
地址