Huang's algorithm

Huang's algorithm is an algorithm for detecting termination in a distributed system.

Uses your system voice; voice and rate in settings.

Snapshot

≈ 2 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Huang's algorithm is an algorithm for detecting termination in a distributed system. The algorithm was proposed by Shing-Tsaan Huang in 1989 in Information Processing Letters.

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: Initially all processes are idle. A distributed task is started by a process sending a computational message to another process. This initial process to send the message is the "controlling agent".

The initial weight of the controlling agent is w (usually 1). The following rules are applied throughout the computation: A process sending a message splits its current weight between itself and the message. A process receiving a message adds the weight of the message to itself.

Upon becoming idle, a process sends a message containing its entire weight back to the controlling agent and it goes idle. Termination occurs when the controlling agent has a weight of 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

Dijkstra–Scholten algorithm

Text derived from https://en.wikipedia.org/w/index.php?oldid=1291866202 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001291866202 · captured 1748028217.0 · version history

Cite this page as: encyclopegia.org, “Huang's algorithm”, snapshot enwiki-001291866202. https://encyclopegia.org/a/huang-s-algorithm

Sources cited in this revision

1 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.