For faster navigation, this Iframe is preloading the Wikiwand page for Huang's algorithm.

Huang's algorithm

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: "Huang's algorithm" – news · newspapers · books · scholar · JSTOR (February 2022) (Learn how and when to remove this message)

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.[1]

Termination detection

[edit]

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

[edit]

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 (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 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

[edit]

Notes

[edit]
  1. ^ Huang, Shing-Tsaan (1989). "Termination detection by using distributed snapshots". Information Processing Letters. 32 (3): 113–119. doi:10.1016/0020-0190(89)90010-0.
{{bottomLinkPreText}} {{bottomLinkText}}
Huang's algorithm
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?