Closed and Open Nested Atomic Actions for Java: Language Design and Prototype Implementation

Chapman, Keith and Hosking, Antony L. and Moss, J. Eliot B. and Richards, Tim

Abstract

We describe the design and prototype implementation of a dialect of Java, XJ, that supports both closed and open nested transactions. As we have previously advocated, open nesting most naturally attaches to the class as the primary abstraction mechanism of Java. The resulting design allows natural expression of layered abstractions for concurrent data structures, while promoting improved concurrency for operations on those abstractions. Moreover, we describe our approach to constructing a prototype implementation of XJ that runs on standard Java virtual machines, by grafting support for transactions onto both application code and library code via load-time bytecode rewriting, for full execution coverage. We rely on extensions to the javac compiler, a JVMTI run-time agent to intercept and rewrite Java classes as they are loaded into the virtual machine, and a run-time library that tracks and manages all transaction meta-data. The resulting prototype will allow further exploration of implementation alternatives for open and closed nested transactions in Java. Our design also addresses the issue of internal deadlock caused by accessing the same data in both closed and open nesting fashion by carefully disallowing such access.

@inproceedings{Chapman+2014PPPJ,
  author = {Chapman, Keith and Hosking, Antony L. and Moss, J. Eliot B. and Richards, Tim},
  title = {Closed and Open Nested Atomic Actions for Java: Language
                    Design and Prototype Implementation},
  booktitle = {International Conference on the Principles and Practice of
                    Programming on the Java platform: virtual machines,
                    languages, and tools},
  series = {PPPJ},
  year = {2014},
  pages = {169--180},
  month = {September},
  address = {Cracow, Poland},
  doi = {10.1145/2647508.2647525},
  acm = {http://dl.acm.org/authorize?N93652}
}