Patent ID: 8768905

Claim:
A system for deadlock management, comprising: a processor; a computer readable storage medium accessible to the processor, wherein the computer readable storage medium stores code, and wherein the code causes the processor to perform: receiving, from an agent that controls a resource, an indication of refusal of a lock request with a first operation identifier for the resource that is already locked with a lock associated with a second operation identifier, wherein the agent that controls the resource returns a value that determines how long the lock request is to stay on a queue, wherein the first operation identifier and the second operation identifier are each a compound key with a first part indicating whether that operation identifier was generated by a transaction manager, with a second part being one of a lock management group name and a transaction manager name, and with a third part being a unique number in a context of one of the lock management group and the transaction manager; placing the lock request in the queue with a lock queue timeout period based on the value from the agent; and in response to determining that the lock associated with the second operation identifier has been released and the lock request reaches a position of the queue from which the lock request is processed within the lock queue timeout period, reissuing the lock request; and in response to determining that the reissued lock request is not granted, based on how many times the lock request has been previously placed in the queue, denying re-queuing of the lock request.