Thin locks: featherweight Synchronization for Java

  • Authors:
  • David F. Bacon;Ravi Konuru;Chet Murthy;Mauricio J. Serrano

  • Affiliations:
  • IBM T.J. Watson Research Center, Yorktown Heights, NY;IBM T.J. Watson Research Center, Yorktown Heights, NY;IBM T.J. Watson Research Center, Yorktown Heights, NY;Intel Microprocessor Research Labs, Santa Clara, CA

  • Venue:
  • ACM SIGPLAN Notices - Best of PLDI 1979-1999
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Language-supported synchronization is a source of serious performance problems in many Java programs. Even single-threaded applications may spend up to half their time performing useless synchronization due to the thread-safe nature of the Java libraries. We solve this performance problem with a new algorithm that allows lock and unlock operations to be performed with only a few machine instructions in the most common cases. Our locks only require a partial word per object, and were implemented without increasing object size. We present measurements from our implementation in the JDK 1.1.2 for AIX, demonstrating speedups of up to a factor of 5 in micro-benchmarks and up to a factor of 1.7 in real programs.