Queue-Dispatch Asynchronous Systems

To make the development of efficient multi-core applications easier, libraries, such as Grand Central Dispatch (GCD), have been proposed. When using such a library, the programmer writes so-called blocks, which are chunks of codes, and dispatches them, using synchronous or asynchronous calls, to several types of waiting queues. A scheduler is then responsible for dispatching those blocks on the available cores. Blocks can synchronize via a global memory. In this paper, we propose Queue-Dispatch Asynchronous Systems as a mathematical model that faithfully formalizes the synchronization mechanisms and the behavior of the scheduler in those systems. We study in detail their relationships to classical formalisms such as pushdown systems, Petri nets, fifo systems, and counter systems. Our main technical contributions are precise worst-case complexity results for the Parikh coverability problem and the termination question for several subclasses of our model. We give an outlook on extending our model towards verifying input-parametrized fork- join behaviour with the help of abstractions, and conclude with a hands-on approach for verifying GCD programs in practice.

[1]  Rupak Majumdar,et al.  Interprocedural analysis of asynchronous programs , 2007, POPL '07.

[2]  Javier Esparza,et al.  Efficient Algorithms for Model Checking Pushdown Systems , 2000, CAV.

[3]  Ahmed Bouajjani,et al.  Analysis of recursively parallel programs , 2012, POPL '12.

[4]  Javier Esparza,et al.  Reachability Analysis of Pushdown Automata: Application to Model-Checking , 1997, CONCUR.

[5]  Daniel Brand,et al.  On Communicating Finite-State Machines , 1983, JACM.

[6]  Rupak Majumdar,et al.  Algorithmic verification of asynchronous programs , 2010, TOPL.

[7]  A. Prasad Sistla,et al.  Reasoning about systems with many processes , 1992, JACM.

[8]  Mahesh Viswanathan,et al.  Decidability Results for Well-Structured Transition Systems with Auxiliary Storage , 2007, CONCUR.

[9]  Mahesh Viswanathan,et al.  Deciding branching time properties for asynchronous programs , 2009, Theor. Comput. Sci..

[10]  Charles Rackoff,et al.  The Covering and Boundedness Problems for Vector Addition Systems , 1978, Theor. Comput. Sci..

[11]  Javier Esparza,et al.  Decidability and Complexity of Petri Net Problems - An Introduction , 1996, Petri Nets.

[12]  Mahesh Viswanathan,et al.  Model Checking Multithreaded Programs with Asynchronous Atomic Methods , 2006, CAV.

[13]  Javier Esparza,et al.  Model checking LTL with regular valuations for pushdown systems , 2001, Inf. Comput..

[14]  Rupak Majumdar,et al.  Verifying liveness for asynchronous programs , 2009, POPL '09.

[15]  Dexter Kozen,et al.  Lower bounds for natural proof systems , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).