|
COQA: A CONCURRENT PROGRAMMING MODEL WITH UBIQUITOUS ATOMICITY
(Draft in PDF)
Xiaoqi Lu , The Johns Hopkins University
Advisor: Professor Scott Smith , The Johns Hopkins University
Abstract:
This paper introduces a new language model, Coqa, for deeply embedding concurrent programming into objects. Every program
written in Coqa has the desirable built-in behaviors of quantized atomicity, mutual exclusion, and race freedom. Such a design inverts the default mode of e.g. Java, where such properties
have to be manually coded using primitive language constructs such as synchronized, resulting in programs that are vulnerable to surprising run time errors. A key property of Coqa is the
notion of quantized atomicity: all concurrent program executions can be viewed as being divided into quantum regions of atomic execution, greatly reducing the number of interleavings to
consider. So rather than building atomicity locally, with small declared zones of atomicity, we build it globally, down from the top. We justify our approach from a theoretical basis by showing that
a formal representation, KernelCoqa, has provable quantized atomicity properties. Then we extend KernelCoqa with two I/O models in which we conduct an in-depth study on how I/O affects the
atomicity property and establish atomicity theorems with respect to I/O. We perform a series of benchmarks in CoqaJava, a Java-based prototype implementation incorporating all of the KernelCoqa features, to demonstrate the
practicability of the Coqa model. We give concrete CoqaJava examples of various common concurrent programming patterns which showcase the strength and ease of programming of the
language.
|