摘要:
Thread synchronization with lock inflation methods and apparatus for managed run-time environments are disclosed. An example method disclosed herein comprises determining a locking operation to perform on a lock corresponding to the object, performing an optimistically balanced synchronization of the lock if the locking operation is not unbalanced, and modifying a lock shape of the lock if the locking operation is unbalanced.
摘要:
Thread synchronization methods and apparatus for managed run-time environments are disclosed. An example method to maintain state information for optimistically balanced synchronization of a lock of an object in a managed runtime environment disclosed herein comprises 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, 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 a first pending optimistically balanced release operation, when a subsequent optimistically balanced synchronization is performed on the lock.
摘要:
A example method disclosed herein comprises initiating a first optimistically balanced synchronization to acquire a lock of an object, the first optimistically balanced synchronization comprising a first optimistically balanced acquisition and a first optimistically balanced release to be performed on the lock by a same thread and at a same nesting level, releasing the lock after execution of program code covered by the lock if a stored state of the first optimistically balanced release indicates that the first optimistically balanced release is still valid, the stored state of the first optimistically balanced release being initialized prior to execution of the program code to indicate that the first optimistically balanced release is valid, and throwing an exception after execution of the program code covered by the lock if the stored state of the first optimistically balanced release indicates that the first optimistically balanced release is no longer valid.
摘要:
A example method disclosed herein comprises initiating a first optimistically balanced synchronization to acquire a lock of an object, the first optimistically balanced synchronization comprising a first optimistically balanced acquisition and a first optimistically balanced release to be performed on the lock by a same thread and at a same nesting level, releasing the lock after execution of program code covered by the lock if a stored state of the first optimistically balanced release indicates that the first optimistically balanced release is still valid, the stored state of the first optimistically balanced release being initialized prior to execution of the program code to indicate that the first optimistically balanced release is valid, and throwing an exception after execution of the program code covered by the lock if the stored state of the first optimistically balanced release indicates that the first optimistically balanced release is no longer valid.
摘要:
Thread synchronization methods and apparatus for managed run-time environments are disclosed. An example method to maintain state information for optimistically balanced synchronization of a lock of an object in a managed runtime environment disclosed herein comprises 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, 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 a first pending optimistically balanced release operation, when a subsequent optimistically balanced synchronization is performed on the lock.
摘要:
Thread synchronization methods and apparatus for managed run-time environments are disclosed. An example method disclosed herein comprises determining a set of locking operations to perform on a lock corresponding to an object, performing an initial locking operation comprising at least one of a balanced synchronization of the lock and an optimistically balanced synchronization of the lock if the initial locking operation is not unbalanced, and, if the initial locking operation is active and comprises the optimistically balanced synchronization, further comprising modifying a state of a pending optimistically balanced release corresponding to the optimistically balanced synchronization if a subsequent locking operation is unbalanced.
摘要:
Thread synchronization methods and apparatus for managed run-time environments are disclosed. An example method disclosed herein comprises determining a set of locking operations to perform on a lock corresponding to an object, performing an initial locking operation comprising at least one of a balanced synchronization of the lock and an optimistically balanced synchronization of the lock if the initial locking operation is not unbalanced, and, if the initial locking operation is active and comprises the optimistically balanced synchronization, further comprising modifying a state of a pending optimistically balanced release corresponding to the optimistically balanced synchronization if a subsequent locking operation is unbalanced.
摘要:
In a system comprising a transactional memory architecture, initiating a transactional memory based transaction and then, within the transaction, checking a lock and if the lock is free, executing a critical section.
摘要:
Thread synchronization with lock inflation methods and apparatus for managed run-time environments are disclosed. An example method disclosed herein comprises determining a locking operation to perform on a lock corresponding to the object, performing an optimistically balanced synchronization of the lock if the locking operation is not unbalanced, and modifying a lock shape of the lock if the locking operation is unbalanced.
摘要:
According to one embodiment a computer method and apparatus for causing a computer to perform a speculative read re-ordered load is disclosed. A speculative read re-ordered load instruction is inserted into the instruction sequence to optimize the code. Memory conflict information representing the speculative read re-ordered load is stored. When a later potentially conflicting load is executed, its physical address is matched against the physical address of the stored memory conflict information. If the potentially conflicting load has a matching physical address and a different value than the stored memory conflict information representing the speculative read re-ordered load, then the stored memory conflict information is invalidated.