发明名称 RELAXED LOCK PROTOCOL
摘要 <p>An object-orientated compiler/interpreter allocates monitor records for use in implementing synchronized operations on objects. When a synchronization operation is to be performed on an object not previously associated with a monitor record, a thread that is to perform the operation 'inflates' the object's monitor by placing into its header a pointer to the monitor record as well as an indication of the monitor's inflated status. When a thread that has thus obtained a lock on an object is to release its lock, it first consults a reference-count field in the monitor record to determine whether any other threads are synchronized on the same object. Then, in an operation that is not atomic with the reference-count-filed consultation, it dissociates the object from the monitor record by removing from the object's header the indication that it is deflated. Since that header change is not atomic with the reference-count check, the releasing thread checks the reference count again after it has already dissociated the monitor record from the object. If that count indicates that further objects had employed the monitor record to synchronize on the object in the interim, then the unlocking thread wakes all waiting threads, which consult the object's header and find that they must resynchronize on it, typically employing a different monitor record. The need for such resynchronization rarely occurs in practice, so avoiding the use of an atomic unlocking operation significantly reduces that synchronization feature's cost.</p>
申请公布号 WO2002039265(A2) 申请公布日期 2002.05.16
申请号 US2001046204 申请日期 2001.10.31
申请人 发明人
分类号 主分类号
代理机构 代理人
主权项
地址