770 likes | 864 Views
A Combinatorial Characterization of the Distributed 1-Solvable Tasks . Ofer Biran , Shlomo Moran, Shmuel Zaks Presented by Ami Paz Technion , Haifa, Israel January 2011. Roadmap. Roadmap. 1-Solvable Tasks – Informal. Asynchronies system. N processors p 1 ,…, p N .
E N D
A Combinatorial Characterization of the Distributed 1-Solvable Tasks OferBiran, Shlomo Moran, ShmuelZaks Presented by Ami Paz Technion, Haifa, Israel January 2011
1-Solvable Tasks – Informal • Asynchronies system. • N processors p1,…,pN. • All the processes are connected to one another. • There are no limitations on the messages (number or size). • But: One process may Crash during the run. • Only a fault crash is allowed. • Which problems can be solved?
Example 1: Weak Consensus • Each processor has initial value of 0 or 1. • Should all decide on 0 or 1. 1 0 1 0 0 0 0 0 1 0
Consensus Alg.: Take I • Algorithm: if someone has 0, all decide 0. 1 1 0
Consensus Alg.: Take I • Algorithm: if someone has 0, all decide 0. 0 0 0
Consensus Alg.: Take II • Algorithm: if someone has 0, all decide 0. 1 1
Consensus Alg.: take II • Algorithm: if someone has 0, all decide 0. ? ?
Consensus Alg.: Take II • Algorithm: if someone has 0, all decide 0. Let’s go for 1 He’s dead?
Consensus Alg.: Take II • Algorithm: if someone has 0, all decide 0. 1 1
Consensus Alg.: Take III • Algorithm: if someone has 0, all decide 0. 1 1 Zzz…
Consensus Alg.: Take III • Algorithm: if someone has 0, all decide 0. ? ? Zzz…
Consensus Alg.: Take III • Algorithm: if someone has 0, all decide 0. Let’s go for 1 He’s dead? Zzz…
Consensus Alg.: Take III • Algorithm: if someone has 0, all decide 0. 1 1 0 Zzz… Guys?
Example 2:Order Preserving Renaming • Each processor starts with a rational value. • Rename to values 1…10, while preserving order. 1 3 -3 1 1000 9 7 4 20 5
OPR Alg.: Take I -3 12 16
OPR Alg.: Take I 2 5 8
OPR Alg.: Take II -2 12
OPR Alg.: Take II Never mind He’s dead?
OPR Alg.: Take III -3 12 Zzz… (16)
OPR Alg.: Take III ? ? Zzz… (16)
OPR Alg.: Take III Never mind He’s dead? Zzz… (16)
OPR Alg.: Take III 2 5 16 Zzz… (16) I decide: 7
OPR Alg.: Take IV -3 12 Zzz… (9)
OPR Alg.: Take IV 2 5 What if we had to rename to values 1…3? Zzz… (9) I decide: 3 9 1...4?
Asynchronous Distributed Network • N–processes, N≥3. • Unique identities, Mutually known. • Also: may not be mutually known. • Massages pass along communication lines: • Arrive with no error. • Arrive in finite, unbounded and unpredictable time. • Complete network. • Also: bi-connected network (connected even after removing one process).
Decision Task • A mapping of possible inputs to allowable outputs. • Let X be a set of input values. • Let D be a set of output values. • A distributed decision taskT is a function: • Where XT ⊆ XN is the set of allowable inputs of T. Maps each allowed vector to a set of legal outputs
Example 1: Weak Consensus - Revised • Each processors has initial value of 0 or 1. • Should all decide on 0 or 1. • Task formulation: This does not rule out trivial solutions
Example 1.5: Strong Consensus • Each processor has initial value of 0 or 1. • Should all decide on 0 or 1. • Starting with consensus, should end up with the same value. • Task formulation:
Why Do We Care About Consensus? • Xoris a consensus task • Majority is a consensus task • Consensus can be done by leader election. • So, impossibility of consensus implies impossibility of leader election. Can leader election be done by consensus?
Example 2:Order Preserving Renaming - Revised • Each processors start with a rational value. • Rename to values 1…k, while preserving order. • Task formulation:
Protocols and Solvability • A Protocolα for a given network is a set ofN programs, each associated with a processor. • A protocol αsolves a task T if for any input vector x∈XT, it satisfies: • All execution are complete. • All Execution outputs are legal.
Faults • A processor P is faulty in an execution e if all messages sent by P during e after a certain time are never received. This is called a crash fault. • No Byzantine faults here…
1-Solvability • A protocol α1-solves a Task T if: • If no processor is faulty, it solves the task. • If in an execution a processor is faulty, then all other processors eventually decide. • If there exist such a protocol, we say the task Tis 1-solvable.
Adjacency Graph • Let for some set A. • Two vectors in A are adjacent if they differ only in one entry. • The adjacency graph of S is denoted by G(S). G(S) S
Connectivity Thm.[MW] • If, for a task T: • The input graph is connected • A protocol α 1-solves T Then: • The output graph of α is connected.
Connectivity – Example 1:Weak Consensus • α for all Pi: decide “1”. Input graph Output graph α • (0,0,0) • (1,0,0) • (1,1,1) • (1,1,0) • (0,1,0) • (1,0,1) • (0,0,1) • (0,1,1) • (1,1,1)
Connectivity – Example 2:Strong Consensus • Input graph is connected, • α 1-solves T, • But: • The output graph of αis not connected! • Is there a protocol α which 1-solves T? Input graph Output graph α • (0,0,0) • (1,0,0) • (1,1,1) • (1,1,0) • (0,1,0) • (1,0,1) • (0,0,0) • (0,0,1) • (0,1,1) • (1,1,1)
The Connectivity Condition • Let T be a decision task. • For any set of allowable inputs C, if: • G(C) is a connected subgraph of the input graph • A protocol α 1-solves T Then: • The output graph of α induced by running α on the inputs in C is connected. • Easy to deduce from the last Thm.: • Define a new task with input C, and the output induced by α and C.
Connectivity – Example 3:Strong Consensus with Majority • Can we solve Strong Consensus, if we have a promise that there is a majority? • The connectivity condition does not deny such a protocol Input graph • (0,0,0,1) α • (0,0,0,0) • (0,0,1,0) Output graph • (0,1,0,0) • (1,0,0,0) • (1,1,1,0) • (1,1,0,1) • (0,0,0,0) • (1,0,1,1) • (1,1,1,1) • (0,1,1,1) • (1,1,1,1)
Induced Task Let α be a protocol that solves a task T. • We denote by Tα the task induced by α and XT. • Tα is defined by: • XT α = XT • The allowable outputs of Tα are all the possible outputs of α and XT.
Example: Strong Consensus • Task formulation: • T: • Protocol α: every Pi chooses by majority. • Tα:
Pointwise Connectivity • A task T is pointwise connected if G(T(x)) is connected for each x∈XT. • i.e., the output graph for each input vector is connected. So, from the connectivity condition we get the following corollary: • Let α be a protocol that 1-solves a task T, then Tα is pointwise connected.
Vectors and Executions • A partial vector is a vector in which one of its’ entries is not specified. • For a vector s=(s1,…,sN), • We denote: si=(s1,…,si-1,*,si+1,…,sN). • s is an extension of si. • Let xi be a partial input vector, and di a partial decision vector of a task T. • di is a covering vector of xi if: • For each extension of xi to a legal input vector x, there is an extension of di to a decision vector d,such that d is a legal decision vector of T on x.