message complexity analysis of shavit-francez termination detection algorithm

12
Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm By:- Rizwan Malik For Advanced OS Course 2007 Instructor: Dr. Mikhail Nesterenko

Upload: ludwig

Post on 23-Jan-2016

52 views

Category:

Documents


0 download

DESCRIPTION

Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm. By:- Rizwan Malik For Advanced OS Course 2007 Instructor: Dr. Mikhail Nesterenko. Overview. Introduction. Objective. Enviornment. Observations. Results. Coding Logic. Conclusion & Future Work. References. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

By:- Rizwan Malik

For Advanced OS Course 2007Instructor: Dr. Mikhail Nesterenko

Page 2: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Overview

Introduction. Objective. Enviornment. Observations. Results. Coding Logic. Conclusion & Future Work. References.

Page 3: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Introduction

Shavit-Francez Algorithm is used for Explicit Termination of De-centralized Distributed Systems(Systems with Multiple Initiators).

Every initiator maintains its own computation tree and when its own computation tree collapses it may participate in the computation tree of other initiators.

All processes participate in a Wave to detect the the termination of the Computation.

Page 4: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Objective

To analyze the message complexity of Shavit-Francez Algorithm.

To determine how to reduce the message complexity by analyzing different Waves.

Page 5: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Enviornment

Randomly Generated Trees were used for this project.

The Basic Computation was generated randomly.

Message Queue delays were introduced.

For the Wave, Echo and Tree algorithm were used.

Each data point value for the graph is based on an average of 10 values.

Page 6: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Observations For a Basic computation with a Message complexity of M, the algorithm

further introduces an increase of M(signals introduced by S-F Algo) + W(tokens generated by the Wave)+A(Stop messages sent by the Announce routine) messages.

The Shavit-Francez Algorithm always runs with worst case complexity.

Selection of the Wave Algorithm impacts the overall message complexity.

Page 7: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Results Term with Echo Term with Tree

10 70.2 62.220 144.2 126.230 207.6 179.640 271.2 233.250 334.6 286.660 404 34670 468.2 400.280 525 44790 595 507

100 655.2 557.2200 1261.4 1063.4300 1871.6 1573.6

Page 8: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Results(Continued)Since decide event takes place at all processes in a Tree based wave, if we halt every process after it decides, we can achieve a better message complexity for the algorithm.However, this observation is limited to tree graphs.

M(BC+Signals+Echo+Announce)

W(BC+Signals+Tree)

10 74.4 56.420 137.6 99.630 210.8 152.840 278.8 200.850 342 24460 401.2 283.270 464 32680 530.4 372.490 589.6 411.6

100 650.4 452.4200 1272.8 874.8300 1872 1274

Page 9: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Result(Continued..)

No. Of Nodes Edge Count Basic Messages Echo Tokens Tree Tokens Signals Announce Stop Messages10 9 19.2 18 18 19.2 1820 19 30.8 38 38 30.8 3830 29 47.4 58 58 47.4 5840 39 61.4 78 78 61.4 7850 49 73 98 98 73 9860 59 82.6 118 118 82.6 11870 69 94 138 138 94 13880 79 107.2 158 158 107.2 15890 89 116.8 178 178 116.8 178

100 99 127.2 198 198 127.2 198200 199 238.4 398 398 238.4 398300 299 338 598 598 338 598

No. Of Nodes Edge Count Basic Messages Echo Tokens Tree Tokens Signals Announce Stop Messages10 9 17.1 18 10 17.1 1820 19 34.1 38 20 34.1 3830 29 45.8 58 30 45.8 5840 39 57.6 78 40 57.6 7850 49 69.3 98 50 69.3 9860 59 84 118 60 84 11870 69 96.1 138 70 96.1 13880 79 104.5 158 80 104.5 15890 89 119.5 178 90 119.5 178

100 99 129.6 198 100 129.6 198200 199 232.7 398 200 232.7 398300 299 337.8 598 300 337.8 598

Fig1

Fig2

Fig1– Data for Graph 1 Mcomplexity for Tree=N.Fig2- Mcomplexity = 2N-2=2E(for trees).

Page 10: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Coding Logic

Randomly Generated Computation:- One message sent/received at a time. Leaves are initiators. A process can, at the maximum, send 5 messages.

Queue Delay:- Delay simulated by Placing the message at index generated randomly

between values 0 and Queue length.

Random Trees:- Matrix(Double indexed array) of size NxN --- N is a user input value. Value of pair(I,J)=1 denotes the presence of an Edge between I & J. Recursively checks for cycles before adding an Edge to the tree. Probability of an Node joining the tree is 50%.

Page 11: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

Conclusion & Future Work

Conclusion:- The Shavit-Francez component of the Algorithm always runs with

worst-case message complexity i.e. it always generates number of messages equal to number of messages generated by the Basic algorithm.

The choice of wave algorithm to be run can effectively reduce the message complexity of the Algorithm as a whole.

For Tree networks the wave with best message complexity is Tree Algorithm based wave.

Future Work:- Perform the same analysis on Arbitrary Graphs. Find the optimal wave for different graph types. To work towards genralize the technique of converting algorithm that

work on diffusing Algorithms to those that work on non-diffusing Algorithms as suggested by N. Shavit, N. Francez in their paper titled “A New Approach to Detection of Locally Indicative Stability“.

Page 12: Message Complexity Analysis of Shavit-Francez Termination Detection Algorithm

References

Class notes for Advances Operating Systems 2007 by Dr. Mikhail Nesterenko.

Introduction to Distributed Algorithms By Gerard Tel.

Nir Shavit, Nissim Francez: A New Approach to Detection of Locally Indicative Stability.