Fast synchronization for quasi-immutable objects
Increasing synchronization performance is one of the most important factors for improving Java performance. We present the concept of quasi-immutable objects and its application to implement fast synchronization primitives. Quasi-immutable objects are usually used for read accesses, but they are rarely used for write accesses. Using these characteristics, we describe the optimization for a synchronized read sequence of quasi-immutable objects. Our described method dynamically detects objects that are not written from critical sections of other threads, and applies the fast read sequence. The optimized read sequence enables the simultaneous execution of critical sections by multiple threads and reduces synchronization overhead. We implemented the described optimization on HotSpot Java VM. The experimental evaluations indicated that the optimization improved the performance of a microbenchmark up to a factor of 16 and SPEC benchmarks up to 31%. Copyright (c) 2007 John Wiley & Sons,Ltd.
synchronization java optimization