Patent ID: 7496574

Claim:
A system for locking, comprising: a processor; a computer readable storage medium accessible to the processor; and program logic including code causing the processor to perform: under control of a first agent: (i) receiving a request from a client with a first operation identifier to lock a first resource controlled by the first agent; (ii) locking the first resource with the first operation identifier, wherein an additional request to lock the first resource with the first operation identifier is granted; (iii) determining whether a second resource controlled by a second agent should be locked for the request from the client with the first operation identifier or with a second operation identifier based on whether a lock on the second resource is to be used to enable the request from the client to complete by determining whether an operation to be performed by the second agent for the request from the client is to complete by a time the request from the client is completed; (iv) in response to determining that the lock on the second resource is to be used to enable the request from the client to complete, locking the second resource with the first operation identifier, wherein an additional request to lock the second resource with the first operation identifier is granted; and (v) in response to determining that the lock on the second resource is not to be used to enable the request from the client to complete, generating a second operation identifier; and locking the second resource with the second operation identifier, wherein an additional request to lock the second resource with the second operation identifier is granted.