Concurrency-related errors such as data races and deadlocks are frustratingly difficult to track down and eliminate in large object- oriented programs. Traditional approaches to preventing these problems rely on protecting instruction sequences with synchronization operations. Such control-centric approaches are inherently brittle as the burden is on the programmer to ensure that all concurrently accessed memory locations are protected consistently. Data-centric synchronization is an alternative approach that offloads some of the work on the language implementation. Data-centric synchronization groups fields of objects into atomic sets to indicate that these fields always must be updated atomically. Each atomic set has associated units of work, code fragments that preserve the consistency of that atomic set. Synchronization operations are added automatically by the compiler. We present an extension to the Java programming language that incorporates data-centric concurrency control. The resulting language, called AJ, relies on a type system that enables separate compilation and supports atomic sets that span multiple objects and that also supports full encapsulation for more efficient code generation. We evaluate our language design by refactoring classes from standard libraries as well as a number of multi-threaded programs to use atomic sets. Our results suggest that data-centric synchronization is easy to use, and enjoys low annotation overhead, while successfully preventing data races and deadlock. Moreover, our experiments suggest that acceptable performance can be achieved with a modest amount of tuning.
Frank Tip is a Professor and Cheriton Research Chair in the David R. Cheriton School of Computer Science at the University of Waterloo. He received his PhD in 1995 from the University of Amsterdam. From 1995-2012, he was a Research Staff Member and Manager in the Software Technology Department at the IBM T.J. Watson Research Center.
Frank's current research interests include: Program Analysis, Refactoring, Test Generation, Fault Localization, Automated Program Repair, Data-Centric Synchronization, and Analysis of Web Applications.