Two-level management of locks on shared resources
First Claim
1. A method for managing locks on shared resources in a distributed computer system comprising:
- receiving at a first primary node a first local lock state from a first secondary node of a plurality of secondary nodes, wherein the first local lock state comprises a lock request for access to a shared resource, a requested lock mode, and merged state information identifying a current state of a plurality of different locks for shared resources held by a plurality of tasks on the first secondary node and indicating a group lock mode representing a combined lock mode for the plurality of tasks on the first secondary node holding the plurality of different locks on the shared resources, wherein the group lock mode is generated by comparing different lock modes held by the plurality of tasks and identifying a lock mode with a corresponding set of compatible lock modes including each of the different lock modes held by the plurality of tasks;
granting the lock request at the first primary node in response to an absence of conflicts;
generating at the first primary node a first global lock state in response to the first local lock state; and
communicating the first global lock state from the first primary node to the first secondary node.
1 Assignment
0 Petitions
Accused Products
Abstract
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.
-
Citations
20 Claims
-
1. A method for managing locks on shared resources in a distributed computer system comprising:
-
receiving at a first primary node a first local lock state from a first secondary node of a plurality of secondary nodes, wherein the first local lock state comprises a lock request for access to a shared resource, a requested lock mode, and merged state information identifying a current state of a plurality of different locks for shared resources held by a plurality of tasks on the first secondary node and indicating a group lock mode representing a combined lock mode for the plurality of tasks on the first secondary node holding the plurality of different locks on the shared resources, wherein the group lock mode is generated by comparing different lock modes held by the plurality of tasks and identifying a lock mode with a corresponding set of compatible lock modes including each of the different lock modes held by the plurality of tasks; granting the lock request at the first primary node in response to an absence of conflicts; generating at the first primary node a first global lock state in response to the first local lock state; and communicating the first global lock state from the first primary node to the first secondary node. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer program product for managing locks on shared resources in a distributed computer system comprising:
a computer readable storage device having computer readable program code embodied therewith, the computer readable program code comprising computer readable program code configured to; receive at a first primary node a first local lock state from a first secondary node of a plurality of secondary nodes, wherein the first local lock state comprises a lock request for access to a shared resource, a requested lock mode, and merged state information identifying a current state of a plurality of different locks for shared resources held by a plurality of tasks on the first secondary node and indicating a group lock mode representing a combined lock mode for the plurality of tasks on the first secondary node holding the plurality of different locks on the shared resources, wherein the group lock mode is generated by comparing different lock modes held by the plurality of tasks and identifying a lock mode with a corresponding set of compatible lock modes including each of the different lock modes held by the plurality of tasks; grant the lock request at the first primary node in response to an absence of conflicts; generate at the first primary node a first global lock state in response to the first local lock state; and communicate the first global lock state from the first primary node to the first secondary node. - View Dependent Claims (10, 11, 12, 13)
-
14. A system for managing locks on shared resources in a distributed computer system comprising:
-
a first primary node comprising a first processor and a memory and configured to communicate with a plurality of secondary nodes each comprising a plurality of tasks, and wherein the plurality of secondary nodes collectively comprises a plurality of shared resources; wherein the first processor is configured with logic to; receive a first local lock state from a first secondary node of the plurality of secondary nodes, wherein the first local lock state comprises a lock request for access to a shared resource, a requested lock mode, and merged state information identifying a current state of a plurality of different locks for shared resources held by a plurality of tasks on the first secondary node and indicating a group lock mode representing a combined lock mode for the plurality of tasks on the first secondary node holding the plurality of different locks on the shared resources, wherein the group lock mode is generated by comparing different lock modes held by the plurality of tasks and identifying a lock mode with a corresponding set of compatible lock modes including each of the different lock modes held by the plurality of tasks; grant the lock request in response to an absence of conflicts; generate a first global lock state in response to the first local lock state; and communicate the first global lock state to the first secondary node. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification