|
Algorithm 2. Low-power Failure Detector. |
|
Input: ,
|
|
Output: suspectlist[] |
| 1. Node q: /*monitoring node*/ |
| 2. Task 1: |
| 3. if and did not receive heartbeat within freshpoint
|
| 4. then add p to suspectlist[]; |
| 5. end if
|
| 6. Task 2: |
| 7. upon receiving heartbeat message from p; |
| 8. if
|
| 9. if
|
| 10. then remove p from suspectlist[]; |
| 11. ; |
| 12. else
|
| 13. ; |
| 14. end if
|
| 15. ; |
| 16. ; |
| 17. ; |
| 18. ; |
| 19. ; |
| 20. end if
|
| 21. Node p: /*detected node*/ |
| 22. for all do
|
| 23. at time : (the i-th detection period); |
| 24. send heartbeat message to node q; |
| 25. ; |
| 26. end for
|