Detecting and tolerating asymmetric races

  • Authors:
  • Paruj Ratanaworabhan;Martin Burtscher;Darko Kirovski;Benjamin Zorn;Rahul Nagpal;Karthik Pattabiraman

  • Affiliations:
  • Cornell University, Ithaca, NY, USA;The University of Texas at Austin, Austin, TX, USA;Microsoft Research, Redmond, WA, USA;Microsoft Research, Redmond, WA, USA;Indian Institute of Science, Bangalore, India;University of Illinois at Urbana-Champaign, Champaign, IL, USA

  • Venue:
  • Proceedings of the 14th ACM SIGPLAN symposium on Principles and practice of parallel programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper introduces ToleRace, a runtime system that allows programs to detect and even tolerate asymmetric data races. Asymmetric races are race conditions where one thread correctly acquires and releases a lock for a shared variable while another thread improperly accesses the same variable. ToleRace provides approximate isolation in the critical sections of lock-based parallel programs by creating a local copy of each shared variable when entering a critical section, operating on the local copies, and propagating the appropriate copies upon leaving the critical section. We start by characterizing all possible interleavings that can cause races and precisely describe the effect of ToleRace in each case. Then, we study the theoretical aspects of an oracle that knows exactly what type of interleaving has occurred. Finally, we present two software implementations of ToleRace and evaluate them on multithreaded applications from the SPLASH2 and PARSEC suites. Our implementation on top of a dynamic instrumentation tool, which works directly on executables and requires no source code modifications, incurs an overhead of a factor of two on average. Manually adding ToleRace to the source code of these applications results in an average overhead of 6.4 percent.