Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.

Similar presentations


Presentation on theme: "Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems."— Presentation transcript:

1 Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems

2 Admin Stuff Quiz #5 return Cloud computing article Lynch’s book chapters 2

3 The Byzantine Generals Problem An agreement problem between the Byzantine generals on whether to attack a city or not – Messengers are not lost, but … – There may be traitors among them To find an algorithm to ensure that the loyal generals will reach agreement – Traitors can trick some to attack and other not to – They can force an attack when no general wants – They can confuse some that the generals cannot decide 3

4 When the mesg is sent orally 4 A B C

5 Answer: There is no solution with fewer than 3m+1 generals can cope with m traitors 5

6 Reference “The Byzantine Generals Problem” Leslie Lamport, Robert Shostak, Marshall Pease ACM Trans. on Programming Languages and Systems, Vol. 4, No. 3, July 1982, pp 382-401 6

7 Distributed Algorithms A large variety of concurrent algorithms – Originally refer to algorithms that were designed to run on many processors “distributed” over a large geographical area – Nowadays those on LAN or even on shared memory multiprocessors 7

8 Attributes of distributed algorithms IPC Timing model Failure model Problems the algorithms solve – Resource allocation, communication, consensus, database concurrency control, deadlock detection, global snapshots, synchronization, etc. 8

9 General Style of Work Problems of significance in practical distributed computing identified Abstract versions are defined Algorithms are developed – They are describe precisely and proved to solve the stated problems; their complexity analyzed Impossibility results and lower bounds proved 9

10 Topics to Cover Synchronous Network Model (Ch. 2-4) – Leader election in a synchronous ring – Breadth-first search – Shortest paths – Min spanning tree – Maximal independent set Asynchronous System Model (Ch. 8-9) – Asynchronous shared memory model 10

11 Synchronous Network Systems Synchronous Network System as a Graph G = (V, E) where n = |V| M : some fixed alphabet states i start i msgs i trans i

12 A round = two steps 1.Apply the message-generation function 2.Apply the state-transition function 12

13 Difference from a traditional automata Accepting states vs halting states 13

14 Failures Process vs link failures Byzantine failure – A process can generate its next messages and next state in some arbitrary way, without necessarily following the rules specified by its message- generation and state-transition functions.

15 Inputs and Outputs Adopt a simple convention to encode the inputs and outputs in the states

16 Executions An execution of the system is an infinite sequence C 0, M 1, N 1, C 1, M 2, N 2, C 3, M 3, N 3, … – C: state assignment – M: message assignment (messages sent) – N: message assignment (messages received)

17 Proof Methods invariant assertion – A property of the system state that is true in every execution, after every round. – Generally proved by induction on r simulation – A goal to show A “implements” another asynchronous algorithm B, in the sense of producing the same input/ouput behavior. – Generally proved by induction on r

18 Complexity Measures time complexity communication complexity

19 Still, how different from an automata? Add a random function to pick new states at each round 19

20 Now our first problem Leader election in a synchronous ring 20

21 The Problem Electing a unique leader – In a ring, exactly one process should output the decision that it is the leader. Versions – All non-leaders declare non-leader. – The ring can be unidirectional or bidirectional. – The number of nodes can be known or not. – Processes can have identical identifiers or not. The former = impossibility result for identical processes Thus, usually the processes are assumed to be identical except for the identifier.


Download ppt "Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems."

Similar presentations


Ads by Google