Eliminating Synchronization-Related Atomic Operations with Biased Locking and Bulk Rebiasing |
Eliminating Synchronization-Related Atomic Operations with Biased Locking and Bulk RebiasingResearch Paper Wednesday, Oct 25, from 15:30 to 17:00
The Java™ programming language contains built-in synchronization primitives for use in constructing multithreaded programs. Efficient implementation of these synchronization primitives is necessary in order to achieve high performance. Recent research has focused on the run-time elimination of the atomic operations required to implement object monitor synchronization primitives. This paper describes a novel technique called "store-free biased locking" which eliminates all synchronization-related atomic operations on uncontended object monitors. The technique supports the bulk transfer of object ownership from one thread to another, and the selective disabling of the optimization where unprofitable, using epoch-based bulk rebiasing and revocation. It has been implemented in the production version of the Java HotSpot™ VM and has yielded significant performance improvements on a range of benchmarks and applications. The technique is applicable to any virtual machine-based programming language implementation with mostly block-structured locking primitives. Kenneth Russell, Sun Microsystems, Inc. David Detlefs, Sun Microsystems, Inc.
|