Data-race exceptions have benefits beyond the memory model

  • Authors:
  • Benjamin P. Wood;Luis Ceze;Dan Grossman

  • Affiliations:
  • University of Washington;University of Washington;University of Washington

  • Venue:
  • Proceedings of the 2011 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Proposals to treat data races as exceptions provide simplified semantics for shared-memory multithreaded programming languages and memory models by guaranteeing that execution remains data-race-free and sequentially consistent or an exception is raised. However, the high cost of precise race detection has kept the cost-to-benefit ratio of data-race exceptions too high for widespread adoption. Most research to improve this ratio focuses on lowering performance cost. In this position paper, we argue that with small changes in how we view data races, data-race exceptions enable a broad class of benefits beyond the memory model, including performance and simplicity in applications at the runtime system level. When attempted (but exception-raising) racy accesses are treated as legal --- but exceptional --- behavior, applications can exploit the guarantees of the data-race exception mechanism by performing potentially racy accesses and guiding execution based on whether these potential races manifest as exceptions. We apply these insights to concurrent garbage collection, optimistic synchronization elision, and best-effort automatic recovery from exceptions due to sequential-consistency-violating races.