Transitive joins: a sound and efficient online deadlock-avoidance policy

We introduce a new online deadlock-avoidance policy, Transitive Joins (TJ), that targets programs with dynamic task parallelism and arbitrary join operations. In this model, a computation task can asynchronously spawn new tasks and selectively join (block) on any task for which it has a handle. We prove that TJ soundly guarantees the absence of deadlock cycles among the blocking join operations. We present an algorithm for dynamically verifying TJ and show that TJ results in fewer false positives than the state-of-the-art policy, Known Joins (KJ). We evaluate an implementation of our verifier in comparison to prior work. The evaluation results show that instrumenting a program with a TJ verifier incurs geometric mean overheads of only 1.06× in execution time and 1.09× in memory usage, which is better overall than existing KJ verifiers. TJ is a practical online deadlock-avoidance policy that is applicable to a wide range of parallel programming models.

[1]  Martin Schulz,et al.  Large Scale Verification of MPI Programs Using Lamport Clocks with Lazy Update , 2011, 2011 International Conference on Parallel Architectures and Compilation Techniques.

[2]  Matteo Frigo,et al.  The implementation of the Cilk-5 multithreaded language , 1998, PLDI.

[3]  Mark Lawley,et al.  Polynomial-complexity deadlock avoidance policies for sequential resource allocation systems , 1997, IEEE Trans. Autom. Control..

[4]  Xiangyu Zhang,et al.  Quasi-static scheduling for safe futures , 2008, PPoPP.

[5]  Sreekaanth S. Isloor,et al.  The Deadlock Problem: An Overview , 1980, Computer.

[6]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[7]  Gérard Boudol A Deadlock-Free Semantics for Shared Memory Concurrency , 2009, ICTAC.

[8]  Martin Schulz,et al.  MPI runtime error detection with MUST: Advances in deadlock detection , 2012, 2012 International Conference for High Performance Computing, Networking, Storage and Analysis.

[9]  Michael D. Ernst,et al.  Static Deadlock Detection for Java Libraries , 2005, ECOOP.

[10]  Robert E. Tarjan,et al.  Fast Algorithms for Finding Nearest Common Ancestors , 1984, SIAM J. Comput..

[11]  Michael A. Bender,et al.  The Level Ancestor Problem Simplified , 2002, LATIN.

[12]  Suresh Jagannathan,et al.  Safe futures for Java , 2005, OOPSLA '05.

[13]  Matthias S. Müller,et al.  MPI Correctness Checking with Marmot , 2008, Parallel Tools Workshop.

[14]  Martin Schulz,et al.  A graph based approach for MPI deadlock detection , 2009, ICS '09.

[15]  Vivek Sarkar,et al.  Habanero-Java: the new adventures of old X10 , 2011, PPPJ.

[16]  Vivek Sarkar,et al.  Finish Accumulators: An Efficient Reduction Construct for Dynamic Task Parallelism , 2012, LCPC.

[17]  Vivek Sarkar,et al.  Habanero-Java library: a Java 8 framework for multicore programming , 2014, PPPJ.

[18]  L.A. Smith,et al.  A Parallel Java Grande Benchmark Suite , 2001, ACM/IEEE SC 2001 Conference (SC'01).

[19]  Lieven Eeckhout,et al.  Statistically rigorous java performance evaluation , 2007, OOPSLA.

[20]  Nobuko Yoshida,et al.  Dynamic deadlock verification for general barrier synchronisation , 2015, PPoPP.

[21]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

[22]  David Holmes,et al.  Java Concurrency in Practice , 2006 .

[23]  David Gay,et al.  Effective static deadlock detection , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[24]  Alejandro Duran,et al.  Barcelona OpenMP Tasks Suite: A Set of Benchmarks Targeting the Exploitation of Task Parallelism in OpenMP , 2009, 2009 International Conference on Parallel Processing.

[25]  Arie Shoshani,et al.  System Deadlocks , 1971, CSUR.

[26]  Michael A. Bender,et al.  The Level Ancestor Problem simplified , 2004, Theor. Comput. Sci..

[27]  Yi Guo,et al.  Work-first and help-first scheduling policies for async-finish task parallelism , 2009, 2009 IEEE International Symposium on Parallel & Distributed Processing.

[28]  Konstantinos Sagonas,et al.  Dynamic deadlock avoidance in systems code using statically inferred effects , 2011, PLOS '11.

[29]  Hua Chen,et al.  MPI‐CHECK: a tool for checking Fortran 90 MPI programs , 2003, Concurr. Comput. Pract. Exp..

[30]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[31]  Peng Li,et al.  Efficient deadlock avoidance for streaming computation with filtering , 2012, PPoPP '12.

[32]  Michael M. Resch,et al.  MPI Application Development Using the Analysis Tool MARMOT , 2004, International Conference on Computational Science.

[33]  Vivek Sarkar,et al.  Deadlock avoidance in parallel programs with futures: why parallel tasks should not wait for strangers , 2017, Proc. ACM Program. Lang..