Cooperative reasoning for preemptive execution

  • Authors:
  • Jaeheon Yi;Caitlin Sadowski;Cormac Flanagan

  • Affiliations:
  • University of California at Santa Cruz, Santa Cruz, CA, USA;University of California at Santa Cruz, Santa Cruz, CA, USA;University of California at Santa Cruz, Santa Cruz, CA, USA

  • Venue:
  • Proceedings of the 16th ACM symposium on Principles and practice of parallel programming
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose a cooperative methodology for multithreaded software, where threads use traditional synchronization idioms such as locks, but additionally document each point of potential thread interference with a "yield" annotation. Under this methodology, code between two successive yield annotations forms a serializable transaction that is amenable to sequential reasoning. This methodology reduces the burden of reasoning about thread interleavings by indicating only those interference points that matter. We present experimental results showing that very few yield annotations are required, typically one or two per thousand lines of code. We also present dynamic analysis algorithms for detecting cooperability violations, where thread interference is not documented by a yield, and for yield annotation inference for legacy software.