Algorithms for scalable synchronization on shared-memory multiprocessors
ACM Transactions on Computer Systems (TOCS)
Reactive synchronization algorithms for multiprocessors
ASPLOS VI Proceedings of the sixth international conference on Architectural support for programming languages and operating systems
Thin locks: featherweight synchronization for Java
PLDI '98 Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation
Efficient object sampling via weak references
Proceedings of the 2nd international symposium on Memory management
The Java Language Specification
The Java Language Specification
Lock reservation: Java locks can mostly do without atomic operations
OOPSLA '02 Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
The DaCapo benchmarks: java benchmarking development and analysis
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Proceedings of the 6th annual IEEE/ACM international symposium on Code generation and optimization
Optimizations in a private nursery-based garbage collector
Proceedings of the 2010 international symposium on Memory management
Hi-index | 0.01 |
For languages supporting concurrency the implementation of synchronization primitives is important for achieving high-performance. Many concurrent languages use object based locks to control access to critical regions. When lock ownership doesn't change for most of its lifetime, lock biasing allows a thread to take ownership of an object so that atomic operations aren't necessary on lock entry and exit. Revoking ownership of locks biased to a thread is an expensive operation compared to the atomic operation, as the thread that holds the lock must be suspended. When lock revocation occurs it is common for the object being locked to be modified so that future lock attempts use atomic operations. When repeated revocations occur the locking policy can reduce the amount of lock biasing that the system performs. Factors that can drive this include the type of the object being revoked and how recently it was allocated. The system must achieve a balance between being pessimistic about biased lock use and avoiding revocations. This work introduces a new locking protocol where revocations can be sampled by the locker without having to bias. The mechanism provides locking information specific to a particular instance that can be used to avoid unprofitable bias lock speculation and create a better locking policy. We demonstrate a new instance specific locking policy implemented in the Zing Virtual Machine, an extension of the HotSpot Java Virtual Machine. We present results on how the sampling window effects the number of atomic lock operations and revocations for the SPECjvm2008 and DaCapo Bach benchmark suites.