Object locks

A single lock word comprises an identifier field for storing a thread identifier associated with a first thread obtaining a lock on an object; an inflation field for storing a fat lock bit upon inflation of the lock on the object; and a contention field for storing a contention bit in response to an...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: BURKA PETER W
Format: Patent
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:A single lock word comprises an identifier field for storing a thread identifier associated with a first thread obtaining a lock on an object; an inflation field for storing a fat lock bit upon inflation of the lock on the object; and a contention field for storing a contention bit in response to an attempt by a second thread to obtain a lock on the object. The values of the single lock word are verified with a single memory fetch instruction. When unlocking an object, a single memory fetch instruction can be used to read the lock word to: (1) determine whether thread T is still the current owner of the lock, and (2) determine the states of inflation and/or contention (i.e., determine whether the fat lock and/or contention bits have been set).