Removing unnecessary synchronization in Java

Citation
J. Bogda et U. Holzle, Removing unnecessary synchronization in Java, ACM SIGPL N, 34(10), 1999, pp. 35-46
Citations number
26
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
34
Issue
10
Year of publication
1999
Pages
35 - 46
Database
ISI
SICI code
1523-2867(199910)34:10<35:RUSIJ>2.0.ZU;2-2
Abstract
Java programs perform many synchronization operations on data structures. S ome of these synchronizations are unnecessary; in particular, if an object is reachable only by a single thread, concurrent access is impossible and n o synchronization is needed. We describe an interprocedural, flow- and cont ext-insensitive data-flow analysis that finds such situations. A global opt imizing transformation then eliminates synchronizations on these objects. F or every program in our suite of ten Java benchmarks consisting of SPECjvm9 8 and others, our system optimizes over 90% of the alias sets containing at least one synchronized object. As a result, the dynamic frequency of synch ronizations is reduced by up to 99%. For two benchmarks that perform synchr onizations very frequently, this optimization leads to speedups of 36% and 20%.