Lock reservation for java reconsidered

2Citations
Citations of this article
5Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Lock reservation, a powerful optimization for Java locks, is based on the observation that, in Java, each lock tends to be dominantly acquired and released by a specific thread. Reserving a lock for such a dominant thread allows the owner thread of the lock to acquire and release the lock without any atomic read-modify-write instructions. A recently proposed algorithm has embodied this idea and significantly reduced the synchronization overhead on a reservation hit. However, on a reservation miss, the algorithm stops the owner thread in order to cancel the reservation, which incurs a significant performance penalty. We propose a new algorithm for lock reservation for Java without such penalties. We derive the algorithm in two steps. First, we create a new, reservation-based algorithm for spin lock. Second, observing that the conventional spin lock is embedded in a widely-used Java lock, we attempt to replace it with our new spin lock. We evaluated our algorithm in IBM's production virtual machine and JIT compiler. The results show that our algorithm attained comparable speedups in the SPECjvm98 benchmarks, and that it even improved the performance of two scientific programs which the previous algorithm actually degraded. © Springer-Verlag 2004.

Cite

CITATION STYLE

APA

Onodera, T., Kawachiya, K., & Koseki, A. (2004). Lock reservation for java reconsidered. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 3086, 560–584. https://doi.org/10.1007/978-3-540-24851-4_26

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free