Upload
ophrah
View
27
Download
0
Embed Size (px)
DESCRIPTION
Is 1 different from 12?. Eli Gafni UCLA. OR. Is theoretical distributed computing is a brunch of Mathematics or Engineering? What is theoretical distributed computing ``on one leg?’’ An algorithm has a geometric representation and a ``code’’ representation. Which should I use?. - PowerPoint PPT Presentation
Citation preview
Is 1 different from 12?Is 1 different from 12?
Eli GafniUCLA
Eli GafniUCLA
OROR
•Is theoretical distributed computing is a brunch of Mathematics or Engineering?
•What is theoretical distributed computing ``on one leg?’’
•An algorithm has a geometric representation and a ``code’’ representation. Which should I use?
•Is theoretical distributed computing is a brunch of Mathematics or Engineering?
•What is theoretical distributed computing ``on one leg?’’
•An algorithm has a geometric representation and a ``code’’ representation. Which should I use?
Consensus TaskConsensus Task
•Two versions:
•0-1: procs input is 0 or 1
•All output o or all output 1
•if output i then some proc input is i
•election: proc input is its id
•all output the same participating id
•Two versions:
•0-1: procs input is 0 or 1
•All output o or all output 1
•if output i then some proc input is i
•election: proc input is its id
•all output the same participating id
k-set Cons (Chaudhuri 90)
k-set Cons (Chaudhuri 90)
•Two versions
•k-value: Proc’s input and output from {0,1,...,k}
•At most k distinct output, if i is output then some proc input is i
•k-Election: Proc input is its id
•All output together at most k participating ids
•Two versions
•k-value: Proc’s input and output from {0,1,...,k}
•At most k distinct output, if i is output then some proc input is i
•k-Election: Proc input is its id
•All output together at most k participating ids
1=?k1=?k
•Can any property of cons has it analogue to k-set cons?
•TST= 2 procs cons ?
•0-1 cons = election ?
•State machine approach to distributed computing ?
•Can any property of cons has it analogue to k-set cons?
•TST= 2 procs cons ?
•0-1 cons = election ?
•State machine approach to distributed computing ?
What about n Processors with m<n consensus?
What about n Processors with m<n consensus?
•With 2-cons can do Test-and-Set•With 2-cons can do Test-and-Set
TST (Test-and-Set)TST (Test-and-Set)•TST: One proc output 0 all the rest 1 (2,1)
•k-TST: At most k at least one proc output 0 all the rest 1 (k+1,k)
•TST implementable for 2 proc cons =(2,1)
•k-TST implementable from (k+1,k) set cons.
•TST: One proc output 0 all the rest 1 (2,1)
•k-TST: At most k at least one proc output 0 all the rest 1 (k+1,k)
•TST implementable for 2 proc cons =(2,1)
•k-TST implementable from (k+1,k) set cons.
nn33
2211
But what about m=3But what about m=3
•(3,1), (k+2,k)
•...[Afek, Weisberger]
•(3,1), (k+2,k)
•...[Afek, Weisberger]
Is View of k-set a la Chahudhuri is the most
convenient?
Is View of k-set a la Chahudhuri is the most
convenient?
•What will be the analogue of binary consensus?
•With consensus b.c.=election, how do I use at most k values to elect at most k leaders?
•What will be the analogue of binary consensus?
•With consensus b.c.=election, how do I use at most k values to elect at most k leaders?
All of DC ``on one foot!’’All of DC ``on one foot!’’
•Geometric approach
• Agreement:
•Geometric approach
• Agreement:
Digression: DC= -Agreement
Digression: DC= -Agreement
11 11 11
11 11
11
000000
0000
00 00 00 00
Center of GravityCenter of Gravity
MWMR RegistersMWMR RegistersWhile total weight < While total weight < WW
make next 0 into 1 make next 0 into 1 at your cornerat your cornerReturn CGReturn CG
AlgorithmicallyAlgorithmically
•All processors return vertices from same triangle restricted to the face of participation
•All processors return vertices from same triangle restricted to the face of participation
aa
bbcc
d...d...
How to converge on ``abstract’’ subdivided
simplex
How to converge on ``abstract’’ subdivided
simplex
•Add ``weight’’ until the ``longest path’’
•If not max add 1 and step one in shortest path to max
•Cannot converge without ``adding’’ unless n=2.
•Add ``weight’’ until the ``longest path’’
•If not max add 1 and step one in shortest path to max
•Cannot converge without ``adding’’ unless n=2.
Ahm...but 2 procs can do 2 0-1 independent cons with at least one output!
Ahm...but 2 procs can do 2 0-1 independent cons with at least one output!
•Can do - agreement at least one agreement no proc will output ?
•But can do - agreement for any number of processors if I can group them in two groups
•With 2-set cons can solve at least one of 2 independent cons!
•Can do - agreement at least one agreement no proc will output ?
•But can do - agreement for any number of processors if I can group them in two groups
•With 2-set cons can solve at least one of 2 independent cons!
11
332200
22
1100
33??
??
o-1 = election (k?)o-1 = election (k?)
•What is the meaning of 0-1 when it comes to k-set???
•What is the meaning of 0-1 when it comes to k-set???
In General In General •3 procs
•Cons i=1,2,3
•Say cons 2
• -agreement on the line perpendicular to the base
•Only 2 lines intersect at a point
•3 procs
•Cons i=1,2,3
•Say cons 2
• -agreement on the line perpendicular to the base
•Only 2 lines intersect at a point
1(2)1(2)0(2)0(2)
0(2)0(2)
11
00
What if 2-set and 3 ind cons?
What if 2-set and 3 ind cons?
•2 out of the 3 cons will return decision
•With k set cons and m>k ind cons then m-k+1 cons will return
•2 out of the 3 cons will return decision
•With k set cons and m>k ind cons then m-k+1 cons will return
TextText
How to do Multi-ValuedHow to do Multi-Valued
121233
123123
123123123123
121233
112323
112233
112233
121233
112233
AlgorithmicallyAlgorithmically
•2 set = 2 ind cons at least on return
•Choose two vectors (a1,a2) (b1,b2)
•post vector proposal for cons on 1st entry
•if alone return for first entry
•else proceed return b2 for 2nd entry
•2 set = 2 ind cons at least on return
•Choose two vectors (a1,a2) (b1,b2)
•post vector proposal for cons on 1st entry
•if alone return for first entry
•else proceed return b2 for 2nd entry
AlgorithmicallyAlgorithmically•2 set cons with 3 ind cons return from at
least 2 con’s
•will have 2 3-entry vectors (a1,a2,a3) (b1,b2,b3)
•post for 1st, if alone return from 1st, post chosen value, proceed to 2nd
•if not alone proceed with B vector to second
•...
•Return all posted values
•2 set cons with 3 ind cons return from at least 2 con’s
•will have 2 3-entry vectors (a1,a2,a3) (b1,b2,b3)
•post for 1st, if alone return from 1st, post chosen value, proceed to 2nd
•if not alone proceed with B vector to second
•...
•Return all posted values
How to do election from set binary-cons
How to do election from set binary-cons
•Will see ``prefix’’ of id for jth cons and propose a bit continuation for a leader name
•But how I know who return what from were: While I assume nobody returned in fact ``she just was late’’
•Will see ``prefix’’ of id for jth cons and propose a bit continuation for a leader name
•But how I know who return what from were: While I assume nobody returned in fact ``she just was late’’
How to do Multi-ValuedHow to do Multi-Valued
•If take small enough if any proc commit all commit or adopt same
•If take small enough if any proc commit all commit or adopt same
adopt 0adopt 0
adopt 1adopt 1
commit 1commit 1 commit 0commit 0
1-State-Machine1-State-Machine
•Want to emulate:
•Repeat:
•All send command to the ``center’’
•Center chooses one and send it to all
•Implement in rounds in SM using consensus in each round
•Want to emulate:
•Repeat:
•All send command to the ``center’’
•Center chooses one and send it to all
•Implement in rounds in SM using consensus in each round
2-State-Machine2-State-Machine
•Want to emaulate
•Repeat synchronously
•All send to ``center1’’ and ``center2’’ at least one of which is omission non-faulty at the round
•Center(s) choose and send back
•Can emulate with 2-set cons?
•Want to emaulate
•Repeat synchronously
•All send to ``center1’’ and ``center2’’ at least one of which is omission non-faulty at the round
•Center(s) choose and send back
•Can emulate with 2-set cons?
Solution 2-State-Machine with 2-set cons
Solution 2-State-Machine with 2-set cons
•Do 2 independents cons
•If get ``adopt v’’ at cons[i] the next command to cons[i] is the adopted value
•If the adopted value was commited all will propose same and commit
•If collid with the new value just commit the adopted
•Do 2 independents cons
•If get ``adopt v’’ at cons[i] the next command to cons[i] is the adopted value
•If the adopted value was commited all will propose same and commit
•If collid with the new value just commit the adopted
Too Numerous RamificationsToo Numerous Ramifications•Subsumes BG
•What is BG?
•If cannot answer 1st-cons both participate, will proceed to second, if collide in 2nd-cons, see exact positions in 1st-cons and can decide it
•Subsumes BG
•What is BG?
•If cannot answer 1st-cons both participate, will proceed to second, if collide in 2nd-cons, see exact positions in 1st-cons and can decide it
??2211
??
ConclusionsConclusions
•It is........ MATH.....•It is........ MATH.....