Patent ID: 7814494

Claim:
A method for performing reliable resource locking for a requested resource comprising: determining, by a first process executed by a hardware processor, that the requested resource is not locked by a second process executing within a first container, wherein the first process and a third process executes within a second container; obtaining a lock for the requested resource; determining, by the first process after obtaining the lock and prior to releasing the lock, that a resource entry associated with the requested resource is in a log object, wherein the log object is associated with the second container, wherein the resource entry is in the log object when, while the first process has the lock, the third process has the lock and has added the resource entry to the log object without removing the resource entry; waiting until after the resource entry associated with the requested resource is removed from the log object by the third process when the third process completes accessing the requested resource based on determining that the resource entry is in the log object; and after the resource entry associated with the requested resource is removed from the log object: adding, by the first process, the resource entry associated with the requested resource to the log object, and accessing the requested resource by the first process.