Coqa: a concurrent programming model with ubiquitous atomicity

  • Authors:
  • Scott Smith;Xiaoqi Lu

  • Affiliations:
  • The Johns Hopkins University;The Johns Hopkins University

  • Venue:
  • Coqa: a concurrent programming model with ubiquitous atomicity
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

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.