Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb 201654.

Slides:



Advertisements
Similar presentations
Leader Election Breaking the symmetry in a system.
Advertisements

Distributed Leader Election Algorithms in Synchronous Ring Networks
Impossibility of Distributed Consensus with One Faulty Process
Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster.
Lecture 8: Asynchronous Network Algorithms
Distributed Computing 1. Lower bound for leader election on a complete graph Shmuel Zaks ©
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Chapter 15 Basic Asynchronous Network Algorithms
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty.
Distributed Computing 2. Leader Election – ring network Shmuel Zaks ©
Distributed Computing 8. Impossibility of consensus Shmuel Zaks ©
Lecture 7: Synchronous Network Algorithms
Distributed Computing 5. Snapshot Shmuel Zaks ©
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Distributed Computing 8. Impossibility of consensus Shmuel Zaks ©
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
1 Complexity of Network Synchronization Raeda Naamnieh.
CPSC 668Set 4: Asynchronous Lower Bound for LE in Rings1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Parallel Routing Bruce, Chiu-Wing Sham. Overview Background Routing in parallel computers Routing in hypercube network –Bit-fixing routing algorithm –Randomized.
1 Fault-Tolerant Consensus. 2 Failures in Distributed Systems Link failure: A link fails and remains inactive; the network may get partitioned Crash:
A (nlog(n)) lower bound for leader election in a clique.
Bit Complexity of Breaking and Achieving Symmetry in Chains and Rings.
Leader Election in Rings
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
Variable-Length Codes: Huffman Codes
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Distributed Computing 5. Snapshot Shmuel Zaks ©
Distributed Computing 5. Synchronization Shmuel Zaks ©
Selected topics in distributed computing Shmuel Zaks
Consensus and Its Impossibility in Asynchronous Systems.
Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks ©
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
By J. Burns and J. Pachl Based on a presentation by Irina Shapira and Julia Mosin Uniform Self-Stabilization 1 P0P0 P1P1 P2P2 P3P3 P4P4 P5P5.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
Leader Election. Leader Election: the idea We study Leader Election in rings.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 5: Synchronous LE in Rings 1.
Lecture #14 Distributed Algorithms (II) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
Leader Election (if we ignore the failure detection part)
Vertex Coloring Distributed Algorithms for Multi-Agent Networks
1 Selecting leader in a clique in O (n log n) By Pierre A.Humblet Presented by: Anat Berkman, Distributed Algorithms, Technion.
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
1 Review Questions Define n variables, types of shared variables, message-passing, shared-memory system, system topology n program-counter/guarded command.
Hwajung Lee. Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.   i,j  V  i,j are non-faulty ::
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Alternating Bit Protocol S R ABP is a link layer protocol. Works on FIFO channels only. Guarantees reliable message delivery with a 1-bit sequence number.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
2016/6/23Election Algorithms1 Introduction to Distributed Algorithm Part Two: Fundamental Algorithm Chapter 7- Election Algorithms Teacher: Chun-Yuan Lin.
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty ::
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Leader Election Chapter 3 Observations Election in the Ring
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Algorithms for COOPERATIVE DS: Leader Election in the MPS model
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
Alternating Bit Protocol
Parallel and Distributed Algorithms
Leader Election CS60002: Distributed Systems
Lecture 8: Synchronous Network Algorithms
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Leader Election Ch. 3, 4.1, 15.1, 15.2 Chien-Liang Fok 4/29/2019
Presented by Jiossy Rami
Presentation transcript:

Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb

Part 0: Part 0: An overview Part 1: Part 1: Lower bounds Part 2: Part 2: Computing in spite of faults Part 3: Part 3: Detecting faults Part 4: Part 4: Self-stabilization 55 GSSI - Feb 2016

message passing (fifo) asynchronous x x x x 56GSSI - Feb 2016 A. Leader election – basic algorithms and upper bounds Leader election = maximum finding

Unidirectional ring phases, unique execution GSSI - Feb

Bidirectional ring sense of direction L R L L L L L L L R R R R R R R GSSI - Feb

Sense of Direction : For each process p in a bidirectional ring, its left and right neighbors are termed left(p) and right(p) respectively. If right(left(p)) = p for every p, then there is a sense of direction (otherwise – no sense of direction) GSSI - Feb

Bidirectional ring no sense of direction R R L L L L L L L R R L R R R R GSSI - Feb

From now: only unidirectional rings The first algorithm that comes to mind is … GSSI - Feb

LeLann’s algorithm GSSI - Feb “All processors send and forward all id’s, until everyone sees its id (and all other id’s). The one whose id is the maximum is the leader”

state := candidate; send (my_id); receive (nid); while nid ≠ my_id do if nid > my_id then state:=no_leader; send (nid); receive (nid); od; if state=candidate then state:=leader. GSSI - Feb

messages: 64 time: 8 My_id nid 1 5 send (my_id); receive (nid); GSSI - Feb My_id nid 5

Theorem: LeLann’s algorithm terminates, and exactly one processor is in state= leader. Message complexity: O(n 2 ) (worst and average) Time complexity: O(n) GSSI - Feb

The first algorithm that comes to mind. GSSI - Feb Chang and Roberts’ algorithm “All processors send their id’s, and then forward only id’s higher than their own. The processor that receives its own id is the leader”

state := candidate; send (my_id); receive (nid); while nid ≠ my_id do if nid > my_id then [ state:=no_leader; send (nid); receive (nid);] od; if state=candidate then state:=leader. GSSI - Feb

messages: = 20 time: 8 GSSI - Feb

Theorem: Chang and Roberts’s algorithm terminates, and exactly one processor is in state= leader. Message complexity: O(n 2 ) (worst) Time complexity: O(n) GSSI - Feb

Theorem: The average message complexity of Chang and Roberts’s algorithm is O(n log n). assume all rings equally probably for the proof – assume id’s 1,2,…, n GSSI - Feb

GSSI - Feb k-1 values < i i x P(i,k) = probability that id i makes exactly k steps x > i k=4

GSSI - Feb Avg number of messages: for i=nfor i<n

GSSI - Feb

Theorem (Pachl, Korach,Rotem): For every algorithm A for maximum finding in asynchronous unidirectional rings, when n is unknown, and every set I of n identities, GSSI - Feb b. Leader election – lower bound on a ring

ring (4, 1, 3, 5 ) (1, 3, 5, 4 ) (3, 5, 4, 1 ) (5, 4, 1, 3 ) GSSI - Feb

messages (4 ) (4,1 ) (4, 1, 3 ) GSSI - Feb

Sequence Prefix of a sequence Concatenation of sequences subsequence of if s.t. C(s) = all cyclic permutations of s |C(s)| = length (s) GSSI - Feb

{ (4, 1, 3, 5 ), (1, 3, 5, 4 ), (3, 5, 4, 1 ), (5, 4, 1, 3 ) } s = (4, 1, 3, 5 ) C(s) = length (s) = 4 (4,1,3) is a prefix of s (1,3) is a subsequence of s GSSI - Feb

Lemma: In every execution of a maximum finding algorithm A, at least one processor must see its own value Proof: assume not. Suppose that in a certain ring s processor a decides it is the maximum without getting such message. Recall: same messages in every execution GSSI - Feb

Assume that in the ring (3,5,4,1) 5 decides it is the maximum without 5 seeing itself. So, may be (5), (5.4),(5,4,1) were sent, but (5,4,1,3) was not. (4 ) (4,1 ) (4,1,3 ) GSSI - Feb

In every execution of a maximum finding algorithm A, at least one processor must see its own value In a ring labeled s, at least one message in C(s) is sent by A (4 ) (4,1 ) (4,1,3 ) (4,1,3,5 ) GSSI - Feb

– set of all finite sequences of distinct integers For GSSI - Feb

s = (4, 1, 3, 5 ) E={(4,5),(3,5),(5,4,1),(3),(6,2),(5,4) } N(s,E) = 4 N 1 (s,E) = 1 N 2 (s,E) = 2 N 3 (s,E) = 1 N k (s,E) = 0 for k ≥ 4 GSSI - Feb

Definition: A setis exhaustive if it has the following two properties:  Prefix property: if then for every prefix s of u.  Cyclic permutation property: GSSI - Feb

is exhaustive: Prefix property: if then for every prefix s of u.  Cyclic permutation property: Example: the set GSSI - Feb

E contains also the following: (4), (4,1),(4,1,3), (1), (3), (5),(5,4),(5,4,1),(5,4,1,3) Q: What is E? A: E is the set of messages sent by the Chang & Roberts’ algorithm! GSSI - Feb

Lemma: Let such that is a prefix of and, and let A be a maximum finding algorithm. If in the execution of A on ring a message is sent, then in the execution of A on ring a message is sent. st u u GSSI - Feb

Theorem: For every maximum finding algorithm A for unidirectional rings, there exists an exhaustive set E(A), such that, for every ring s, A sends at least N(s,E(A)) messages on s. Proof: Let GSSI - Feb E(A) = { s  D | a message s is sent when A executes on ring s. }

1. E(A) is exhaustive 1a. Prefix property GSSI - Feb E(A) = { s  D | a message s is sent when A executes on ring s. }

1. E(A) is exhaustive 1b. Cyclic permutation property GSSI - Feb E(A) = { s  D | a message s is sent when A executes on ring s. }

2. At least N(s,E(A)) messages sent by A on s GSSI - Feb E(A) = { s  D | a message s is sent when A executes on ring s. } End of Proof.

GSSI - Feb

Theorem: For every maximum finding algorithm A for unidirectional rings, and a set of n identities I, we have: GSSI - Feb

GSSI - Feb

Lemma: GSSI - Feb

GSSI - Feb

Theorem: In a unidirectional ring whose size n is unknown, the Chang & Roberts’ algorithm has an optimal average message complexity of GSSI - Feb

- What if n is known? - What if the network is synchronous? Same lower bound of Ω(n log n) messages applies, under some assumptions. GSSI - Feb

Asynchronous network G(V,E) |V| = n processors G is complete : every two processors are connected Distinct ID’s Each processor knows only its ID GSSI - Feb c. Leader election – lower bound on a clique

GSSI - Feb

GSSI - Feb Theorem (Korach, Moran, Zaks): The message complexity of the leader election problem on a clique is Ω(n log n).

f(n) – maximal number of messages for a clique network of size n Informal proof GSSI - Feb

GSSI - Feb

n n 1 GSSI - Feb

n n 1 f(n) GSSI - Feb

nn 1 f(n) GSSI - Feb

n n 1 O(n) GSSI - Feb

GSSI - Feb

n n GSSI - Feb

GSSI - Feb

n n GSSI - Feb xixi yjyj yiyi xjxj  (n 2 ) disjoint squares, one message on each, hence a  (n 2 ) lower bound

GSSI - Feb d. Lower bound on bit complexity

GSSI - Feb References Gerard Le Lann, Distributed Systems - Towards a Formal Approach, IFIP E. Chang and R. Roberts, An improved algorithm for decentralized extrema-finding in circular configurations of processes, CACM, J. Pachl, E. Korach and D. Rotem, Lower bounds for distributed maximum-finding algorithm, JACM, E. Korach, S. Moran and S. Zaks, Optimal lower bounds for some distributed algorithms for a complete network of processors, 1987