发明名称 Locking of computer resources
摘要 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.
申请公布号 US2003070021(A1) 申请公布日期 2003.04.10
申请号 US20020288393 申请日期 2002.11.05
申请人 SUN MICROSYSTEMS, INC. 发明人 JOY WILLIAM N.;O'CONNOR JAMES MICHAEL;TREMBLAY MARC
分类号 G06F9/46;(IPC1-7):G06F12/00 主分类号 G06F9/46
代理机构 代理人
主权项
地址