Termination Detection for Diffusing Computations
This chapter presents a distributed program that uses a fifo channel and implements the termination-detection channel in Chap. 14 over the addresses of the fifo channel for the case where only one user is active initially. Such a distributed computation is referred to as a “diffusing” computation (because it “diffuses” out from the initially active user). The program employs the Dijkstra-Scholten algorithm, which is itself a diffusing computation. It maintains a distributed dynamic tree that includes all active users and is rooted at the user that is initially active. The tree grows whenever a user not on the tree becomes active and shrinks whenever a user at a leaf of the tree becomes inactive. Termination is detected by the user that was initially active when that user finds the tree to be empty. Because trees have many uses in distributed computing (just as in sequential computing), the distributed tree-growing algorithm underlying the solution is a useful building block of distributed programs.
KeywordsActive User Leaf Node Termination Detection Atomic Step Algorithm Level
- 1.E.W. Dijkstra, W.H.J. Feijen, A.J.M. van Gasteren, Derivation of a termination detection algorithm for distributed computations. Inf. Process. Lett. 16(5), 217–219 (1983). Also EWD 840Google Scholar
- 3.F. Mattern, Algorithms for distributed termination detection. Distrib. Comput. 2(3), 161–175 (1987). http://dblp.uni-trier.de/db/journals/dc/dc2.html#Mattern87
- 4.G. Tel, F. Mattern, The derivation of distributed termination detection algorithms from garbage collection schemes. ACM Trans. Progr. Lang. Syst. 15(1), 1–35 (1993). doi: 10.1145/151646.151647. http://doi.acm.org/10.1145/151646.151647