发明名称 Two-level management of locks on shared resources
摘要 In a shared data system comprising one or more primary nodes and a plurality of secondary nodes, global lock manager on a primary node manages locks for shared resources by exchanging an abstract lock state with local lock managers on the secondary nodes. The abstract lock state includes a particular representation of all of the applications on the nodes that are requesting or are granted locks. The exchange of these particular lock states instead of individual requests improves performance by increasing concurrency and reducing off-machine communication. A global deadlock detector on a node detects and resolves global deadlocks, in conjunction with local deadlock detectors on the secondary nodes.
申请公布号 US8868755(B2) 申请公布日期 2014.10.21
申请号 US201313950414 申请日期 2013.07.25
申请人 International Business Machines Corporation 发明人 Attaluri Gopi K.;Finnie James L.;Palmer Stewart L.;Plachta Piotr M.;Swart Garret F.;Xue Xun;Zheng Roger L.Q.
分类号 G06F15/173;G06F17/30;G06F9/52;G06F9/50 主分类号 G06F15/173
代理机构 Edell, Shapiro & Finnan, LLC 代理人 Kashef Mohammed;Edell, Shapiro & Finnan, LLC
主权项 1. A computer-implemented method for managing locks on shared resources in a distributed computer system comprising: receiving at a first primary computer node a first local lock state from a first secondary computer node of a plurality of secondary computer nodes, wherein the first local lock state provides an amalgamated representation of lock states of one or more tasks on the first secondary computer node and comprises a lock request for access to a shared resource by one or more tasks on the first secondary computer node, a requested lock mode for the lock request, and merged state information of tasks on the first secondary computer node waiting for or holding locks on shared resources, and wherein the merged state information indicates a group lock mode generated by comparing lock modes of the tasks on the first secondary computer node waiting for or holding locks on the shared resources and identifying a lock mode compatible with each of the lock modes of the tasks as the group lock mode based on the comparing; at the first primary computer node, if the first local lock state is not stale, granting the lock request if no conflicts exist, and otherwise adding the first local lock state to a priority queue for the shared resource requested in the lock request and processing the priority queue for the shared resource requested in the lock request;at the first primary computer node, generating a first global lock state in response to the first local lock state, wherein the first global lock state comprises a holdable lock mode that is granted to the first secondary computer node for the shared resource requested in the lock request and merged state information of the plurality of secondary computer nodes with respect to the lock request;communicating the first global lock state from the first primary computer node to the first secondary computer node; at a global deadlock detector, receiving and storing lock conflict information from two or more of the plurality of secondary computer nodes, wherein for each of the two or more secondary computer nodes the lock conflict information comprises local lock waits and lock interests for one or more tasks on that secondary computer node; at the global deadlock detector, detecting a global deadlock using the received lock conflict information, wherein a global deadlock is a deadlock between tasks on two or more different ones of the plurality of secondary computer nodes;at the global deadlock detector, resolving the detected global deadlock by selecting one of the deadlocked tasks as a victim; andcommunicating the victim selection from the global deadlock detector to the secondary computer node where the selected victim task is located.
地址 Armonk NY US