Patent ID: 7567963
Filing Date: 2009-07-28
Classification: G06F,Y10S

Abstract:
1. A method to lock an object comprising: determining a locking operation to perform on a lock corresponding to the object; is unbalanced, wherein the locking operation is unbalanced if the locking operation is not associated with a second complimentary locking operation, wherein the locking operation is performed for a thread in a managed run-time environment operating in a processing device; performing the locking operation by performing an optimistically balanced synchronization of the lock comprising an optimistically balanced acquisition of the lock to acquire the lock for the thread and a complimentary optimistically balanced release of the lock to release the lock for the thread if the locking operation is not unbalanced; and using state information associated with optimistically balanced acquisitions of the lock to allow recursive optimistically balanced acquisitions of the lock by the thread without counting the recursive optimistically balanced acquisitions of the lock, wherein the state information is not processed to count the recursive optimistically balanced acquisitions of the lock unless a subsequent unbalanced locking operation is attempted on the lock while the lock is acquired by the thread.