Reverse reachability analysis: A new technique for deadlock detection on communicating finite state machines

Yung-Chen Hung, Gen-Huey Chen
1993 Software, Practice & Experience  
The communicating finite state machines can exchange messages over bounded FIFO channels. In this paper, a new technique, called reverse reachability analysis, is proposed to detect deadlocks on the communication between the communicating finite state machines. The technique is based on finding reverse reachable paths starting from possible deadlock states. If a reverse reachable path can reach the initial global state, then deadlock occurs. Otherwise the communication is deadlock-free. The
more » ... ctiveness of the technique has been verified by some real protocols such as a specification of X.25 call establishment/clear protocol and Bartlet's alternating bit protocol. key words: Communicating finite state machine Deadlock detection Reachability analysis Reverse reachability analysis 0038-0644/93/090965-15$12.50 966 y.-c. hung and g.-h. chen deadlock-free. The effectiveness of the approach has been verified by some real protocols such as a specificiation of X.25 call establishment/clear protocol 2 and Bartlet's alternating bit protocol. 5 PREVIOUS WORK The problem of deadlock detection has been studied extensively, 1,2,6-14 and the previous solution methods can be classified into the following categories. 1. Bounded message types. This class is to limit the number of generated global states by bounding the number of message types. For example, the number of message types used in References 7, 10 and 12 is restricted to one. 2. Sufficient conditions. This class is to identify a set of sufficient conditions that can guarantee the absence of deadlocks. Peng and Purushothamman 11 proposed sufficient conditions for checking the absence of deadlocks, which can be carried out by approximate algorithms. Nevertheless, the emphasis in those approximate algorithms is on checking the absence of deadlocks rather than the presence of deadlocks. 3. Bounded tree. This class is to limit the depth of the reachability tree that grows during reachability analysis. The determination of a suitable tree depth is also difficult. Some of the existing examples can be found in References 1, 2, 8 and 14. 4. Decidable conditions. This class is to identify a set of conditions that can guarantee the deadlock detection problem decidable. Two existing examples can be found in References 6 and 9. However, they provide no algorithms for deadlock detection; they only show the existence of such algorithms because the algorithm implementation is difficult. On the whole, all of these categories are based on reachability analysis, which is a procedure to exhaustively explore all the possible global states of the communication system. A global state of the communication system is defined as a combination of the states of co-operating processes and the contents of channels connecting them. From a given initial global state, all possible transitions, receiving events or sending events, are generated, leading to a number of new global states. This process is repeated for each of the newly generated global states until no new global states can be generated, and the reachability tree is thus constructed. The major disadvantage of this technique is the state space explosion problem, because the size of the global state space may grow rapidly with the number and complexity of the involved protocol entities. In References 2, 8 and 15, some algorithms are proposed that remedy this problem to some degree. In contrast to reachability analysis, reverse reachability analysis, which is detailed later in this paper, generates reverse global states in the opposition direction, starting from the possible deadlock states. If the initial global state can be reached during the process of reverse reachability analysis, then deadlock exists. Otherwise the communication system is deadlock-free. NOTATIONS AND DEFINITIONS The communication system consists of two processes P 1 and P 2 and two FIFO queues Q 12 and Q 21 . It is assumed that Q 12 and Q 21 are bounded, unidirectional, and
doi:10.1002/spe.4380230904 fatcat:f5masp6pvjfcpevl6jlq4tqo24