Huang's algorithm explained

Huang's algorithm is an algorithm for detecting termination in a distributed system. The algorithm was proposed by Shing-Tsaan Huang in 1989 in the Journal of Computers.[1]

Termination detection

The basis of termination detection is in the concept of a distributed system process' state. At any time, a process in a distributed system is either in an active state or in an idle state. An active process may become idle at any time but an idle process may only become active again upon receiving a computational message.

Termination occurs when all processes in the distributed system become idle and there are no computational messages in transit.

Algorithm

Huang's algorithm can be described by the following:

w

(usually 1).

w

and is in the idle state.

Some weaknesses to Huang's algorithm are that it is unable to detect termination if a message is lost in transit or if a process fails while in an active state.

See also

Notes and References

  1. Huang . Shing-Tsaan . Shing-Tsaan Huang . Termination detection by using distributed snapshots . Information Processing Letters . 32 . 3 . 113–119 . 1989 . 10.1016/0020-0190(89)90010-0 .