System and method for space and time efficient object locking
AssigneeSun Microsystems, Inc.
InventorsGuy L. Steele, Jr., William N. Joy
Life of this patent
Estimating the term…
Loading patent…
AssigneeSun Microsystems, Inc.
InventorsGuy L. Steele, Jr., William N. Joy
Estimating the term…
In a system and method for managing repeated lock requests to synchronize an object with a particular thread, each lockable object has a lock datum and each thread can repeatedly request a lock for an object without knowing whether the thread is already synchronized with the object. Associated with each thread are a pair of locking registers and a pair of stack data structures. The registers reference the last object whose lock was acquired by the thread and contain a redundancy count indicating the number of consecutive lock requests for the object. The stack data structures contain references to other objects that are currently synchronized with the thread and an associated redundancy count for each such object. A locking procedure acquires the lock of an object only if a reference to the object is not contained in the registers or the stack data structures. For lock requests on objects that are already synchronized with the thread, the thread's locking registers and stack data structures are updated to reflect the additional lock request. An unlocking procedure releases an object's lock only when all lock requests for the object are relinquished by the thread.
A computer-implemented method for synchronizing objects with threads in a computer system having a plurality of threads and a memory storing a plurality of objects, a subset of the threads each requiring synchronization with various ones of the objects while performing predefined computational operations, said method comprising the steps of:
A computer system, comprising:
A method for operating a computer system having a plurality of threads and a memory storing a plurality of lockable objects, a subset of the threads each requiring synchronization with various ones of the lockable objects while performing predefined computational operations, said method comprising the steps of:
A computer program product for use in conjunction with a data processing system having a plurality of threads and a memory storing a plurality of lockable objects, a subset of the threads each requiring synchronization with various ones of the lockable objects while performing predefined computational operations, each thread of the subset of said threads including a data structure indicating objects the thread is synchronized with and a number of synchronization actions by the thread with respect to each object with which the thread is synchronized;
Dependencies are inferred from the claim text.