Locking of computer resources
AssigneeSun Microsystems, Inc.
InventorsWILLIAM N. JOY, JAMES MICHAEL O' CONNOR, MARC TREMBLAY
Life of this patent
Estimating the term…
Loading patent…
AssigneeSun Microsystems, Inc.
InventorsWILLIAM N. JOY, JAMES MICHAEL O' CONNOR, MARC TREMBLAY
Estimating the term…
A computer processor includes a number of register pairs LOCKADDR/LOCKCOUNT. In each pair, the LOCKADDR/LOCKCOUNT register is to hold a value that identifies a lock for a computer resource. When a lock instruction issues, the corresponding LOCKCOUNT register is incremented. When an unlock instruction issues, the corresponding LOCKCOUNT register is decremented. The lock is freed when a count associated with the LOCKCOUNT register is decremented to zero. This scheme provides fast locking and unlocking in many frequently occurring situations. In some embodiments, the LOCKCOUNT registers are omitted, and the lock is freed on any unlock instruction corresponding to the lock. In some embodiments, a computer object includes a header which include a pointer to a class structure. The class structure is aligned on a 4-byte boundary, and therefore two LSBs of the pointer to the class structure are zero and are not stored in the header. Instead, two header LSBs store: (1) a LOCK bit indicating whether the object is locked, and (2) a WANT bit indicating whether a thread is waiting to acquire a lock for the object.
A circuit comprising:
A process for performing a locking or unlocking operation on a computer resource, the process comprising:
A computer readable storage medium storing computer object data, the object data comprising a field storing information identifying an address of a portion of the object data, wherein the portion of the object data is for being stored on a two-byte boundary, and wherein the field has a size of a computer address but the field stores less than all the bits of the address of the portion of the object data so that fewer than all the bits of the field are used to store the address of the portion of the object data, and wherein one or more bits of the field that are not used to store the address of the portion of the object data are for storing information indicating whether the object is locked.
Dependencies are inferred from the claim text.