Phase Algorithm
From CasGroup
(New page: The '''phase algorithm''' is the asynchronous version of the heartbeat algorithm. Each node or process waits until it has received all messages of phase (or round)...) |
|||
| Line 1: | Line 1: | ||
| + | ---- | ||
| + | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
| + | ---- | ||
| + | =[http://ocilufic.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]= | ||
| + | ---- | ||
| + | =[http://ocilufic.co.cc CLICK HERE]= | ||
| + | ---- | ||
| + | </div> | ||
The '''phase algorithm''' is the asynchronous version | The '''phase algorithm''' is the asynchronous version | ||
of the [[Heart Beat Algorithm|heartbeat algorithm]]. Each node or process | of the [[Heart Beat Algorithm|heartbeat algorithm]]. Each node or process | ||
| Line 15: | Line 23: | ||
phase, every node knows his neighbors. In the second round, | phase, every node knows his neighbors. In the second round, | ||
every node knows his neighbors and their neighbors. | every node knows his neighbors and their neighbors. | ||
| - | In each round the | + | In each round the "horizon" is expanded by one "hop". |
After D rounds, where D equals the diameter of the | After D rounds, where D equals the diameter of the | ||
network, each node has informations about the whole | network, each node has informations about the whole | ||
| Line 38: | Line 46: | ||
. int r // phase counter | . int r // phase counter | ||
. | . | ||
| - | . wile (r | + | . wile (r<D) do |
. { | . { | ||
. // spread information | . // spread information | ||
| Line 44: | Line 52: | ||
. | . | ||
. // collect information | . // collect information | ||
| - | . while ((received[i] | + | . while ((received[i] < r) for all i) |
. { receive message from all in-neighbors } | . { receive message from all in-neighbors } | ||
. | . | ||