Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presented By: Md Amjad Hossain

Similar presentations


Presentation on theme: "Presented By: Md Amjad Hossain"— Presentation transcript:

1 Presented By: Md Amjad Hossain
Performance analysis of Chandra and Toueg's first consensus algorithm with S failure detector Presented By: Md Amjad Hossain 12/6/2018 Advanced Operating Systems

2 Advanced Operating Systems
Outline Introduction Overview of the Algorithm Experimental setup Experimental Results Conclusion and Future Work Code Defense 12/6/2018 Advanced Operating Systems

3 Advanced Operating Systems
Introduction Consensus problem: Each correct process proposes a value All correct processes decide some values which are proposed by some of them. System Model Asynchronous: To decide, each process waits to receive all others processes’ values. But some of them may be crashed. No bound on message delay for asynchronous system. So, need failure detector that can suspect processes as crashed. Failure Detector S: Strong Completeness: Eventually every process that crashes is permanently suspected by every correct process Weak Accuracy: Some correct process is never suspected 12/6/2018 Advanced Operating Systems

4 Overview of the Algorithm
- tolerates up to n-1 crashes, - Satisfies uniform agreement three phases Weak accuracy – some correct processes never suspected 12/6/2018 Advanced Operating Systems

5 Overview of the Algorithm
- Never suspected process = 1 - Completely connected topology Process ID =1 Dp = { 3 } Vp = {L, L, L, L} Decide = Process ID =1 Dp = { 3 } Vp = {L, 0, L, L} Decide = In Each round: - Send new values to all - Wait to receive values from all correct processes. (L,0,L,L) Process ID =0 Dp = { 2 , 3 } Vp = {L, L, L, L} Decide = Process ID =0 Dp = { 2 , 3 } Vp = {2, L, L, L} Decide = Process ID =0 Dp = { 2 , 3 } Vp = {2, 0, L, L} Decide = (2,L,L,L) Process ID =3 Dp = { 0, 2 } Vp = {L, L, L, L} Decide = Process ID =3 Dp = { 0, 2 } Vp = {L, L, L, 2} Decide = (2,L,L,L) (2,L,L,L) Process ID =2 Dp = { 0 , 3} Vp = {L, L, L, L} Decide = Process ID =2 Dp = { 0 , 3} Vp = {L, L, 3, L} Decide = Process 0 send values to all and waits to receive value only from Process 1 - Receive value from 1, move to next round 12/6/2018 Advanced Operating Systems

6 Advanced Operating Systems
Experimental Setup In Detector module - Dp is populated randomly. - Size Dp is considered randomly as well as N/2. Topology : Completely connected graph Three parameters of the algorithm are mainly measured For both size of Dp, average number of round needed to receive all process’s values for different number of Processes in the system. Ran for N = 4, 8, 12, … 60. For each round, the percentage of processes that get values from all other processes. Here N = 8 and 60 is considered. Average number of waiting time for each process in phase1 for N =8 and 60. Waiting time is the number of times a presses is selected to execute but has to wait to receive all processes’ values who are not in its Dp. 12/6/2018 Advanced Operating Systems

7 Advanced Operating Systems
Experimental Results 1) Average number of Round needed to receive all processes’ values a) Random sized Dp b) N/2 sized Dp. Dp size 30 in this case If each process’s Dp size is closed to N, Suppose N-1, or N-2 , then every process has to go through all round to see if it is possible to receive any value via the only correct process. 12/6/2018 Advanced Operating Systems

8 Advanced Operating Systems
Experimental Results Average Size of the set Dp of Crashed processes For large value of N, Dp size is slightly larger than N/2. So More round may be needed. 12/6/2018 Advanced Operating Systems

9 Advanced Operating Systems
Experimental Results 2) Percentage of Processes per round that received all others’ values - As the topology completely connected graph. More nodes in the system more ways to get other nodes’ values. 12/6/2018 Advanced Operating Systems

10 Advanced Operating Systems
Experimental Results 3) Average waiting time for Processes in a round at Phase 1. This is a measurement of how well the selection of processes for execution is distributed - Waiting time is the number of times a presses is selected to execute but has to wait to receive all processes’ values who are not in its Dp. - Processes are selected randomly to execute actions. The waiting time also depends on the size of Dp for the processes. 12/6/2018 Advanced Operating Systems

11 Conclusion and Future Work
Providing a balanced Dp size ( close to N/2) for all processes in the system it is possible to obtain all other processes’ value with significantly smallest number of rounds. Almost <=3 for N >=8. A process simply can exit from phase1 just when it receives all other processes’ values. So, this can be a simple improvement of the algorithm As a future work one can consider to implement this improved algorithm. As I have considered only completely connected topology, One can consider arbitrary topology to see how the current and the improved algorithm behaves. 12/6/2018 Advanced Operating Systems

12 Advanced Operating Systems
Code Defense - I have implemented the algorithm in c++. The implementation was straight forward. Here some points where I faced little bit difficulty to implement: Generating crashed process in Dp randomly for random size. How to keep a process waiting in Phase 1 and Phase 2 – Solved by maintaining a boolean variable “waiting”. To run the algorithm for different value of N in same Run of the program to collect experimental data. – Solved Externally deleting all processes’ input and output channels Click here to See Code 12/6/2018 Advanced Operating Systems

13 Advanced Operating Systems
References Tushar Deepak Chandra and Sam Toueg Unreliable failure detectors for reliable distributed systems. J. ACM 43, 2 (March 1996), DOI= / Slide “Failure detectors T16 ” at “ 12/6/2018 Advanced Operating Systems

14 Advanced Operating Systems
Questions? 12/6/2018 Advanced Operating Systems


Download ppt "Presented By: Md Amjad Hossain"

Similar presentations


Ads by Google