Details

Deadlock Analysis of Message-Passing Programs with Identical Processes

by Zhou, Jun

Abstract (Summary)

Deadlocks are a common type of faults in message-passing programs. One approach to detecting deadlocks in a message-passing program is to perform reachability analysis, which involvesderiving possible global states of the program. The resulting state graph is referred to as a reachability graph (RG). The size of the RG of a message-passing program, in the worst case, is anexponential function of the number of processes in the program. This problem, referred to as the state explosion problem, makes reachability analysis impractical for message-passing programs withmany processes.

Assume that P is a message-passing program that contains one process type T with a dynamic number of instances. Let P_m denote the version of P that has m instances of T. To detect deadlocks inP, we apply reachability analysis to P_1, P_2, ..., and P_n, where n is an integer chosen randomly or according to some criterion. If the value of n is large, reachability analysis of P_n is impractical. Ifthe value of n is small, we have little confidence on whether P_k is deadlock-free for any k > n. A deadlock cutoff number c for P means that under certain conditions, if P_c has no deadlocks, then P_khas no deadlocks for any k > c. For message-passing programs that contain two or more process types with dynamic numbers of instances, their deadlock cutoff vectors are defined in a similar way.

In this dissertation we present four approaches to finding deadlock cutoff numbers for synchronous message-passing programs. These approaches are based on the use of observational equivalence,projection equivalence, client/server reachability graphs, and abstract client/server reachability graphs, respectively. The first three approaches assume that each process in a synchronousmessage-passing program is modeled as a labeled transition system (LTS). The fourth approach assumes that each process in a synchronous message-passing program is modeled as acommunicating finite state machine (CFSM) or extended CFSM.

Observational equivalence is an important concept in verifying properties of LTS systems. Let L be an instance of process type T in P. The environment of L in P_m, m>0, is defined to be thecomposition of processes in P_m excluding L. In other words, P_m is the composition of L and its environment in P_m. We show that if there exists an integer n such that the environments of L in P_nand P_{n+1} are observational equivalent and P_n has no global deadlocks, then P_k, k>n, has no global deadlocks and n is a deadlock cutoff number for P. We also show how to apply this approach toring-structured programs. One major problem with this approach is that it fails to find deadlock cutoff numbers for many message-passing programs.

To improve the above approach, we define a new equivalence relation called projection equivalence, which is weaker than observational equivalence. The projection of L in P_m, i>0, is defined to bethe behavior of L in P_m. The environments of L in P_i and P_j, i=\=j, are said to be projection equivalent if L has the same projection in P_i and P_j. We show how to apply projection equivalence tofind deadlock cutoff numbers for client/server programs and ring-structured programs. A client/server program contains a server and a number of clients. Clients call the server to request service;they do not communication with each other. The server cannot call individual clients. For client/server programs, we define a new type of reduced reachability graphs, called client/server reachabilitygraphs or CSRGs. The size of the CSRG of a client/server program is a polynomial function of the number of clients. Based on CSRGs, we show how to determine the existence of a deadlock cutoffnumber for a client/server program and how to find this number if it exists. We also show how to find deadlock cutoff vectors for client/server programs with two or more types of clients.

Finally, we consider client/server programs with two-way communication, which allows the server to call individual clients. Each client in such a program is represented as a communicating finitestate machine (CFSM), while the server is represented as an extended CFSM. For such programs, we define a new type of reduced reachability graphs, called abstract CSRGs or ACSRGs. Basedon ACSRGs, we show how to find deadlock cutoff numbers for client/server programs with two-way communication. Our empirical studies show that ACSRGs are much smaller than theircorresponding RGs. For example, for a solution to the gas station problem with one pump and six customers, its ACSRG has 74 states and its RG has 25394 states.

Bibliographical Information:

Advisor:K. C. Tai; Harry Perros; Mladen A. Vouk; S. Purush Iyer

School:North Carolina State University

School Location:USA - North Carolina

Source Type:Master's Thesis

Keywords:computer science

ISBN:

Date of Publication:01/10/2001

© 2009 OpenThesis.org. All Rights Reserved.