Distributed Computing: A Glimmer of A Theory: Eli Gafni Ucla
Distributed Computing: A Glimmer of A Theory: Eli Gafni Ucla
A Glimmer of a Theory
Eli Gafni
UCLA
Porquerolles, 5/6/03
Outline
• Tasks
• Model of Computations as Tasks
• Solving a task in a Model
• SWMR Task
• Characterization of Wait-Free Solvability
• Resiliency and Strong Primitives (BG Sim)
• Uniform Tasks and Protocols
• Methodology
• Characterization
• Open Problems
Distinguish Models by the Set of
Tasks They Solve
• Task:
– An input output relation from input i-tuples to sets of
output i-tuples, i=1,…,n
Ti : Vi 2Vi
– (p1) {(p1)}
– (p2) {(p2)}
– (p1,p2) {(p1,p1), (p2,p2)}
Models of Computation
• Tasks viewed as Rewrite system:
– (p1) {(p1)}
– (p2) {(p2)}
– (p1,p2) {((p1),(p1,p2)),((p1,p2),(p1,p2)),
((p1,p2),(p2))}
p1 p2
No matter what will (p1,p2) map to there will
be a p1-p2 edge
The one-shot protocol complex is CONNECTED,
the cons output complex is disconnected:
p1:(p1) p2:(p1) p1:(p2) p2:(p2)
The Multi-Shot Protocol
Complex
• Reduction to 2 set-consensus
3 processors uniform renaming
impossible with 4 slots
• Each processor output a value in {1,2,3,4}
• All values in a tuple are distinct
• Participating set size 1 returns 1, size 2 does
not return 4.
Complexity O(n2)
Large did not finish first scan before small scan (otherwise small
Scan is strictly after large scan). Consequently, second large scan
Is strictly after small write.
Complexity O(n log n)
Uniformization of the O(nlogn)
Snapshot protocol
• Suppose I have 2n processor 1,2n but
expect only 1,n to participate.
• Want to operate the 1,n algorithm and still
recover in case some from n+1,n arrive.
Uniformization of the O(nlogn)
Snapshot protocol (cont’)
• Idea:
– Processor 1,n executes the 1,n protocol.
– When i<n+1 terminates, it posts Si, and checks whether
any of the n+1,2n registered:
• No: processor i departs
• Yes: Joins the protocol 1,2n with Si as input
– Processor n+1,2n takes its input to be its id union the
largest Si it observe posted in 1,n.
Uniformization of the Immediate
Snapshot (IS) Protocol
• Processor 1,n executes the 1,n protocol.
• All register upon arrival.
• When i<n+1 terminates, it posts Si, and checks whether
any of the n+1,2n registered:
– No: processor i departs
– Yes: Joins the protocol 1,2n with all the largest Sj smaller than Si
posted
• Processor in n+1,2n takes as “input’’ all the Sj’s it observe
posted.
• Processor first drops tokens on behalf of the smallest Sj in
its input.
Uniformization of the Immediate
Snapshot (IS) Protocol (Cont’d)
• After that it drops tokens on its behalf
a b c d
Solvable Uniform Task - No
Uniform Solution (cont’ed)
SDS2(S2)
a b c d c b a b c d
Solvable Uniform Task - No
Uniform Solution (cont’ed)
• For Tn n-even processors p0,p1,pn-1,pn output
SDSn(s3), only that the face p0,p1 maps
snakewise to a,b,c,d,c,…
• Tn is obviously solvable by taking enough
steps to produce SDSn(s3).
Solvable Uniform Task - No
Uniform Solution (cont’ed)
• For the Uniform version of Tn (downward
compatible) pi chooses a vertex in SDSn(s3) but
maps it to a vertex in SDSi(s3), by considering
only the LAST i iterations.
• Not solvable uniformly, since pn-1 and pn do not
“know” which actual vertices p0 and p1“meant” by
outputting, say, c and d, respectively.
Characterization of Uniform
Solvability
• HS: A task on n+1 processor is solvable iff
there exist a map from the output to an n-
dim subdivided simplex.
• Uniform Solvability: The map to the n+1-
dim subdivided simplex extends the map to
the n-dim subdivided simplex
Idea of Proof Of the
Characterization
• IIS model that gives rise to a protocol
complex which is a subdivided simplx
• Show equivalence of IIS to standard
asynchronous model by showing
UNIFORM emulations between the
standard and the IIS model.
Connection to Adaptive
Algorithms
• Adaptive Algorithms: Distributed
Algorithms whose Step Complexity is a
Function of the Number of Participating
Processors Rather than n.
• Adaptive Algorithms = Uniform Algorithms
for Symmetric problems (e.g. Snapshots)
Open Problem(S)
• Extend to infinite arrival guaranteeing
– Non-Blocking
– Waitfreeness
• How do you formulate such a problem as a
task?