Relaxed lock protocol

作者: David Dice

DOI:

关键词:

摘要: An object-orientated compiler/interpreter allocates monitor records for use in implementing synchronized operations on objects. When a synchronization operation is to be performed an object not previously associated with record, thread that perform the 'inflates' object's by placing into its header pointer record as well indication of monitor's inflated status. has thus obtained lock release lock, it first consults reference-count field determine whether any other threads are same object. Then, atomic reference-count-filed consultation, dissociates from removing deflated. Since change check, releasing checks reference count again after already dissociated If indicates further objects had employed synchronize interim, then unlocking wakes all waiting threads, which consult and find they must resynchronize it, typically employing different record. The need such resynchronization rarely occurs practice, so avoiding significantly reduces feature's cost.

参考文章(36)
Ravi B. Konuru, David F. Bacon, Mauricio J. Serrano, Chet Murthy, Thin locks: featherweight Synchronization for Java (with retrospective) Best of PLDI. pp. 583- 595 ,(1998)
Paul Jerome Kilpatrick, Michael Wayne Brown, Kelvin Roderick Lawrence, Michael Thomas Collins, Weiming Gu, System and method for adding highly optimized synchronization capability to objects at run-time ,(1997)
Charles Consel, Bárbara Moura, Fabrice Bellard, Gilles Muller, Harissa: a flexible and efficient java environment mixing bytecode and compiled code usenix conference on object oriented technologies and systems. pp. 1- 1 ,(1997)