Atom-Aid: Detecting and Surviving Atomicity Violations

June 12, 2008
2:50 pm - 4:00 pm
Halligan 111b
Speaker: Brandon Lucia, Tufts University
Host: Sam Guyer


Bio: Brandon Lucia, an alumnus of the Tufts Computer Science Dept. is a Computer Architecture Ph.D. student at the University of Washington. The focus of Brandon's research is multiprocessor programmability, ranging from novel hardware to support testing and debugging, to hardware and software for making it easier to write parallel programs. Presently, Brandon is working under the advisory of Prof. Luis Ceze (UW), and is generously supported by The Clairemont L. Egdvedt Memorial Fellowship, and the University of Washington Faithful Steward Endowed Fellowship.

Abstract: Writing shared-memory parallel programs is error-prone. Among the concurrency errors that programmers often face are atomicity violations, which are especially challenging. They happen when programmers make incorrect assumptions about atomicity and fail to enclose memory accesses that should occur atomically inside the same critical section. If these accesses happen to be interleaved with conflicting accesses from different threads, the program might behave incorrectly.

Recent architectural proposals arbitrarily group consecutive dynamic memory operations into atomic blocks to enforce memory ordering at a coarse grain. This provides what we call implicit atomicity, as the atomic blocks are not derived from explicit program annotations. In this paper, we make the fundamental observation that implicit atomicity probabilistically hides atomicity violations by reducing the number of interleaving opportunities between memory operations. We then propose Atom-Aid, which creates implicit atomic blocks intelligently instead of arbitrarily, dramatically reducing the probability that atomicity violations will manifest themselves. Atom-Aid is also able to report where atomicity violations might exist in the code, providing resilience and debuggability. We evaluate Atom-Aid using buggy code from applications including Apache, MySQL, and XMMS, showing that Atom-Aid virtually eliminates the manifestation of atomicity violations.