Facilitating bulk lock-unbiasing in an object-based system
First Claim
1. A method for facilitating bulk lock-unbiasing for objects within an object-based computing system, comprising:
- maintaining an epoch for a biasable object class and each instance of the biasable object class, wherein the epoch is a field containing a timestamp;
wherein if the epoch for the biasable object class matches the epoch for a specific instance of the biasable object class, any bias for the specific instance is currently valid;
receiving a signal to perform a bulk lock-unbiasing operation for instances of the biasable object class;
in response to the signal, stopping all threads in the object-based computing system at a safe point, andperforming a bulk lock-unbiasing operation for unlocked instances of the biasable object class by incrementing the epoch for the biasable object class and by incrementing corresponding epochs for locked instances of the biasable object class; and
upon encountering a lock-acquisition operation while executing a current thread, wherein the lock-acquisition operation attempts to acquire a lock for the specific instance,examining synchronization information associated with the specific instance, wherein the process of examining the synchronization information does not involve atomic operations, andif the synchronization information indicates that the lock is biasable, the lock is biased toward the current thread, and the epoch of the specific instance matches the epoch of the biasable object class, allowing the current thread to acquire the lock without updating the synchronization information.
2 Assignments
0 Petitions
Accused Products
Abstract
One embodiment of the present invention provides a system that facilitates bulk lock-unbiasing for objects within an object-based computing system. The system maintains an epoch, which is a field containing a timestamp, for a biasable object class and each instance of the biasable object class. If the epoch for the biasable object class matches the epoch for a specific instance of the biasable object class, the system knows that any bias for that specific instance is currently valid. When the system receives a signal to perform a bulk lock-unbiasing operation for instances of the biasable object class, it responds by stopping all threads in the object-based computing system at a safe point. Then, the system performs a bulk lock-unbiasing operation for unlocked instances of the biasable object class by incrementing the epoch for the biasable object class and by incrementing corresponding epochs for locked instances of the biasable object class.
22 Citations
20 Claims
-
1. A method for facilitating bulk lock-unbiasing for objects within an object-based computing system, comprising:
-
maintaining an epoch for a biasable object class and each instance of the biasable object class, wherein the epoch is a field containing a timestamp; wherein if the epoch for the biasable object class matches the epoch for a specific instance of the biasable object class, any bias for the specific instance is currently valid; receiving a signal to perform a bulk lock-unbiasing operation for instances of the biasable object class; in response to the signal, stopping all threads in the object-based computing system at a safe point, and performing a bulk lock-unbiasing operation for unlocked instances of the biasable object class by incrementing the epoch for the biasable object class and by incrementing corresponding epochs for locked instances of the biasable object class; and upon encountering a lock-acquisition operation while executing a current thread, wherein the lock-acquisition operation attempts to acquire a lock for the specific instance, examining synchronization information associated with the specific instance, wherein the process of examining the synchronization information does not involve atomic operations, and if the synchronization information indicates that the lock is biasable, the lock is biased toward the current thread, and the epoch of the specific instance matches the epoch of the biasable object class, allowing the current thread to acquire the lock without updating the synchronization information. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for facilitating bulk lock-unbiasing for objects within an object-based computing system, comprising:
-
maintaining an epoch for a biasable object class and each instance of the biasable object class, wherein the epoch is a field containing a timestamp; wherein if the epoch for the biasable object class matches the epoch for a specific instance of the biasable object class, any bias for the specific instance is currently valid; receiving a signal to perform a bulk lock-unbiasing operation for instances of the biasable object class; in response to the signal, stopping all threads in the object-based computing system at a safe point, and performing a bulk lock-unbiasing operation for unlocked instances of the biasable object class by incrementing the epoch for the biasable object class and by incrementing corresponding epochs for locked instances of the biasable object class; and upon encountering a lock-acquisition operation while executing a current thread, wherein the lock-acquisition operation attempts to acquire a lock for the specific instance, examining synchronization information associated with the specific instance, wherein the process of examining the synchronization information does not involve atomic operations, and if the synchronization information indicates that the lock is biasable, the lock is biased toward the current thread, and the epoch of the specific instance matches the epoch of the biasable object class, allowing the current thread to acquire the lock without updating the synchronization information. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. An apparatus for facilitating bulk lock-unbiasing for objects within an object-based computing system, comprising:
-
at least one processor; a maintenance mechanism configured to maintain an epoch for a biasable object class and each instance of the biasable object class, wherein the epoch is a field containing a timestamp; wherein if the epoch for the biasable object class matches the epoch for a specific instance of the biasable object class, any bias for the specific instance is currently valid; a receiving mechanism configured to receive a signal to perform a bulk lock-unbiasing operation for instances of the biasable object class; a stop mechanism configured to, in response to the signal, stop all threads in the object-based computing system at a safe point; and an incrementing mechanism configured to perform a bulk lock-unbiasing operation for unlocked instances of the biasable object class by incrementing the epoch for the biasable object class and by incrementing corresponding epochs for locked instances of the biasable object class; and a lock-acquisition mechanism, wherein upon encountering a lock-acquisition operation while executing a current thread, the lock-acquisition mechanism is configured to attempt to acquire a lock for the specific instance by, examining synchronization information associated with the specific instance, wherein the process of examining the synchronization information does not involve atomic operations, and if the synchronization information indicates that the lock is biasable, the lock is biased toward the current thread, and the epoch of the specific instance matches the epoch of the biasable object class, allowing the current thread to acquire the lock without updating the synchronization information. - View Dependent Claims (20)
-
Specification