Wait-Free Consensus with Infinite Arrivals James Aspnes Gauri Shah Jatin Shah Yale University STOC 2002 Consensus (1) Get collection of processes to agree on a value s.t. Agreement: all processes give same output. Consensus Protocol Consensus (2) Validity: if inputs agree, output=input. Consensus Protocol Wait-Free Termination: finite work done by any process Why do we care about consensus? Universal Construction (Herlihy 1991) Wait-free implementation of any linearizable shared object using consensus n-processor Consensus Object Linearized operations Impossibility of Consensus* *Deterministic, asynchronous, with 1 failure: •Message-passing model (Fischer, Lynch, Paterson ’85) •Shared-memory model (Loui, Abu-Amara ’87) Possible using: Randomization Algorithms for randomized consensus: Ben-Or (1983) and many others So far... Consensus with n processes is possible using randomization What happens if we don’t know n? What if we have infinitely many processes? Infinite Arrivals Model (Gafni, Merritt, Taubenfeld 2001) birth death alive asleep Concurrency R/W registers Countably infinite collection of processes Communicate using atomic shared R/W registers Infinite Arrivals Model Concurrency: number of processes alive at any time •Unbounded, Bounded, b-Bounded RW----R---R---W---W R---R---R---W R----R Adversary controls scheduling of processes. Algorithms for the model Collect •updatei(d): write d to register i. •scani:equivalent to reading all nonempty registers one at a time. Snapshot like collect, but all registers read simultaneously. A Randomized Binary Consensus Protocol (Based on Chandra 1996) Race between processes with and : Slow processes adopt leader’s preference: c No agreement of leaders: flip global coin Shared Coin Processes toss own coins and take majority of all values. 1 0 0 0 0 0 1 1 0 1 0 0 1 0 Votes Cast Strong adversary can selectively kill processes about to write votes for values he does not like. Voting with n processes Strong adversary can shift total by n-1 votes by killing processes carrying selected votes. Probability -(n-1) 0 (n-1) Sum of votes Processes repeatedly vote to get total of n2 votes Then take majority of votes to get constant probability of unbiased outcome. But with infinitely many processes... Adversary can hide infinitely many votes! Probability 0 Sum of votes Adversary can shift the majority to get any outcome desired. Convergent Voting Let vote of process i be Vote of i weighted by ith term of convergent series 1/i1ε i i Adversary can shift majority only by constant amount! Gives shared coin Binary Consensus With few additions: Expected work of process i: O(T i1ε) (T: Number of operations for one collect) So we have… Consensus for infinitely many processes with: •Binary input values •Process identities What about: •Arbitrarily many input values? •No identities? Infinitary Consensus (Based on adaptive mutual exclusion of Attiya, Bortnikov 2000) Time taken by process with 1 value k = O(T log k) [T = time for single execution of 2 3 binary consensus protocol] 4 5 6 7 Binary Consensus Protocol 8 9 10 11 12 13 14 15 Naming: Lazy Clock (with b-bounded concurrency) Issue identities to anonymous processes. Then use regular shared coin. max=28 c=29 12 19 2 21 28 29 23 b registers c := max of all b registers + 1 reg[c mod b] := c Returns < b2 duplicates of c. Choose ID from large range to separate duplicates. Weak adversary (b-bounded concurrency) Adversary can select votes but can’t see them. Shared coin: Write local coin tosses to registers and take majority vote. 0 0 0 2b log b registers Each (anonymous) process takes: O(b log b) time. Summary of Results (for strong adversary) Concurrency Anonymity Operations for ith process O(T i 1ε)* Unbounded No Bounded No O(T i 1ε) Yes Unbounded b-bounded, b>1 No O(T i 1ε) Yes Unbounded 1-bounded Yes O(1) *Corresponding lower bound exists T = number of operations for one collect Summary of Results (for weak adversary) Concurrency Anonymity Operations per process Bounded Yes O(b log b) b-bounded, b>1 Yes O(b log b) The big open question Is it possible to do consensus with Unbounded Concurrency and Anonymity? Cannot build shared coin for above conditions with strong adversary! Design a protocol without a shared coin?
Pages to are hidden for
"stoc2002"Please download to view full document