Corpus ID: 31013845

Lock optimizations on the HotSpot VM

@inproceedings{Pool2014LockOO,
  title={Lock optimizations on the HotSpot VM},
  author={T{\~o}nis Pool},
  year={2014}
}
This report gives an overview of different optimisations made by the Java HotSpot VM to decrease the overhead of synchronisation. It lists the major strategies, explains why they work and provides and cites some rudimentary benchmarking to prove that they work. 

Figures and Tables from this paper

Efficient Sampling-based Lock Contention Profiling for Java
TLDR
A novel sampling-based approach for collecting detailed information on lock contention in Java applications by using the Java Virtual Machine Tool Interface (JVMTI) and bytecode instrumentation and can determine not only where contention occurs but also where it is caused. Expand
Efficient Tracing and Versatile Analysis of Lock Contention in Java Applications on the Virtual Machine Level
TLDR
A novel approach for analyzing lock contention in Java applications by tracing locking events in the Java Virtual Machine, which observes not only when a thread is blocked on a lock, but also which other thread blocked it by holding that lock, and records both their call chains. Expand
Efficient dynamic analysis of the synchronization performance of Java applications
TLDR
This approach provides developers with exhaustive information on the synchronization behavior of their application, but incurs such low overhead that it is feasible to use it for monitoring production systems and can precisely show where optimizations have the largest impact. Expand

References

SHOWING 1-9 OF 9 REFERENCES
Thin locks: featherweight Synchronization for Java
TLDR
A new algorithm is proposed that allows lock and unlock operations to be performed with only a few machine instructions in the most common cases, and only require a partial word per object, and was implemented without increasing object size. Expand
Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing
TLDR
A novel technique called store-free biased locking is described which eliminates all synchronization-related atomic operations on uncontended object monitors and is applicable to any virtual machine-based programming language implementation with mostly block-structured locking primitives. Expand
Escape analysis for Java
TLDR
A new program abstraction for escape analysis, the connection graph, that is used to establish reachability relationships between objects and object references is introduced and it is shown that the connectiongraph can be summarized for each method such that the same summary information may be used effectively in different calling contexts. Expand
Lock reservation: Java locks can mostly do without atomic operations
TLDR
A novel algorithm called lock reservation, which exploits thread locality of Java locks, which claims that the locking sequence of a Java lock contains a very long repetition of a specific thread. Expand
Avoiding Benchmarking Pitfalls on the JVM
Biased Locking, OSR, and Benchmarking Fun.
  • http://mechanical-sympathy. blogspot.com/2011/11/ biased-locking-osr-and-benchmarking-fun. html,
  • 2011
Synchronization and Object Locking.
  • https://wikis.oracle.com/display/ HotSpotInternals/Synchronization,
  • 2008
Synchronization in java se 6 (hotspot).
  • http://home.comcast.net/ ~pjbishop/Dave/MustangSync.pdf,
  • 2006
Java theory and practice: Synchronization optimizations in Mustang.
  • Lock optimizations on the HotSpot VM • November 2014 http://www.ibm.com/developerworks/
  • 2005