Patent ID: 8136112

Claim:
A method to maintain state information for optimistically balanced synchronization of a lock of an object in a managed runtime environment, the method comprising: storing state information comprising a state of each pending optimistically balanced release operation corresponding to each pending optimistically balanced synchronization to be performed on the lock of the object, each pending optimistically balanced synchronization comprising respective paired acquisition and release operations between which an unknown number of unpaired locking operations are to occur, wherein the state of each pending optimistically balanced release operation comprises a previous lock owner of the lock and a validity flag to indicate whether the respective pending optimistically balanced release operation is valid or invalid; and modifying a first stored state of a first pending optimistically balanced release operation when a subsequent unpaired locking operation is performed on the lock, but not modifying any stored state of any pending optimistically balanced release, including the first stored state of the first pending optimistically balanced release operation, when a subsequent optimistically balanced synchronization is performed on the lock.