Check out the new USENIX Web site. next up previous
Next: Experimentation Up: Improved Thin Locks Previous: Modifications to the lock

Modifications to the unlock operation

The unlock operation is modified to check the contention bit of the currently executing thread. This check is only done when a lock is actually released (as locks are recursive), after releasing the lock.

When the lock of object $b_o$ is released by thread $y_t$, and if the contention bit of thread $y_t$ is set, then (1) thread $y_t$ acquires its own contention lock, and (2) iterates over all the elements of its tuple linked list. For each tuple ($x_t$, $z_o$), if ($z_0 = b_o$), thread $x_t$ is simply signaled. If ( $z_o \not = b_o$), the lock of object $z_o$ is inflated13(if it is thin), then thread $x_t$ is signaled. Finally, (3) thread $y_t$ empties its tuple linked list, clears its contention bit, and releases its contention lock.



2001-02-27