Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System...

17
Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel

Transcript of Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System...

Page 1: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm

CS 6/73201 Advanced Operating System

Presentation by: Sanjitkumar Patel

Page 2: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Outline

• Goal• Introduction• Experiments Setup• Results and Analysis• Conclusion and Future Work

Page 3: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Goal

• To compare Tarry’s and Awerbuch’s Algorithm.• Theoretically, Time complexity of Awerbuch’s algorithm

is better than Tarry’s algorithm Tarry ( 2 x Number of edges) Awerbuch ( 4 x Number of nodes) - 2• Theoretically, Message complexity of Tarry’s algorithm

is better than Awerbuch’s algorithm Tarry ( 2 x Number of edges) Awerbuch ( 4 x Number of edges)• How they perform in real world?

Page 4: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Introduction

• Tarry’s Algorithm:– Initiator forwards the token to one of its neighbors, each

neighbor forwards the token to all other nodes and when done returns the token.

• Awerbuch’s Algorithm:– A node holding the token for the first time informs all

neighbors except its father.– Prevents token forwarding over frond edges -each process

knows which neighbors were visited before it forwards the token.

Page 5: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Experiments Setup

• Graphs are usually random for these experiments• We need to measure time and message complexities while

varying size and density of network• Number of nodes are entered from terminal.• Based on the input provided by user, random graph is

generated.• E.g. user entered number of nodes = 4 then, 4x4 matrix is

generated.• Matrix is initialized by randomly generating 0 and 1. • 1 means there is an edge between nodes and 0 means there

is no edge between nodes

Page 6: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Experiments Setup

• Suppose randomly generated matrix is as follows: 1 2 3 4

1 0

1 0 1

2 1 0 1 1

3 0 1 0 1

4 1 1 1 0

Page 7: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Experiments Setup

• Suppose randomly generated graph is as follows: 1 2 4 3

1 2 3 4

1 0

1 0 1

2 1 0 1 1

3 0 1 0 1

4 1 1 1 0

Page 8: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Experiments Setup

• Data are collected by varying number of nodes and connection probability.

• Connection probability means if there is an edge between nodes or not.

• Since 2 nodes don’t help, nodes taken into consideration for experiments were from 3 to 50.

• Significant difference was noticed while nodes count was reaching to 50.

• Connection probability considered was 25%, 50% and 75%.

Page 9: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Results and Analysis

• Comparison of time complexity at connection probability of 25%

Time Complex.

Number of nodes

4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 500

100

200

300

400

500

600

700

TarryAwerbuch

Page 10: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Results and Analysis

• Comparison of time complexity at connection probability of 50%

Time complex.

Number of nodes

4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 500

200

400

600

800

1000

1200

1400

TarryAwerbuch

Page 11: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Results and Analysis

• Comparison of time complexity at connection probability of 75%

Time Complex.

Number of nodes

4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 500

200

400

600

800

1000

1200

1400

1600

1800

2000

TarryAwerbuch

Page 12: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Results and Analysis

• Comparison of message complexity at connection probability of 25%

Message Complex

Number of nodes

4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 500

200

400

600

800

1000

1200

1400

TarryAwerbuch

Page 13: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Results and Analysis

• Comparison of message complexity at connection probability of 50%

Message Complex

Number of nodes4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50

0

500

1000

1500

2000

2500

3000

TarryAwerbuch

Page 14: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Results and Analysis

• Comparison of message complexity at connection probability of 75%

Message Complex

Number of nodes4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50

0

500

1000

1500

2000

2500

3000

3500

4000

TarryAwerbuch

Page 15: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Conclusion

• Awerbuch’s algorithm is more effective than Tarry’s algorithm in time complexity

• Tarry’s algorithm is more effective than Awerbuch’s algorithm in message complexity

• Both time and message complexity of Tarry’s algorithm, and message complexity of Awerbuch’s algorithm are sensitive to the density of graph, but time complexity of Awerbuch’s algorithm is not sensitive to the density of graph

Page 16: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Future Work

• Experiment on larger N• Experiment on real distributed systems

Page 17: Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.

Thank You