Gadara: dynamic deadlock avoidance for multithreaded programs

  • Authors:
  • Yin Wang;Terence Kelly;Manjunath Kudlur;Stéphane Lafortune;Scott Mahlke

  • Affiliations:
  • EECS Department, University of Michigan and Hewlett-Packard Laboratories;Hewlett-Packard Laboratories;EECS Department, University of Michigan;EECS Department, University of Michigan;EECS Department, University of Michigan

  • Venue:
  • OSDI'08 Proceedings of the 8th USENIX conference on Operating systems design and implementation
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Deadlock is an increasingly pressing concern as the multicore revolution forces parallel programming upon the average programmer. Existing approaches to deadlock impose onerous burdens on developers, entail high runtime performance overheads, or offer no help for unmodified legacy code. Gadara automates dynamic deadlock avoidance for conventional multithreaded programs. It employs whole-program static analysis to model programs, and Discrete Control Theory to synthesize lightweight, decentralized, highly concurrent logic that controls them at runtime. Gadara is safe, and can be applied to legacy code with modest programmer effort. Gadara is efficient because it performs expensive deadlock-avoidance computations offline rather than online. We have implemented Gadara for C/Pthreads programs. In benchmark tests, Gadara successfully avoids injected deadlock faults, imposes negligible to modest performance overheads (at most 18%), and outperforms a software transactional memory system. Tests on a real application show that Gadara identifies and avoids both previously known and unknown deadlocks while adding performance overheads ranging from negligible to 10%.