Encoding from Multi Diagonal Sequence A = { 0 , 1 } × N Code ( n ) : (0 , i ) , (1 , i ) , (0 , i ) , . . . , (1 , i ) , (0 , i ) , (1 , i ) D i n 010 . . . 0101 f (( b 1 , d 1 ) , ( b 2 , d 2 ) , . . . , ( b n , d n )) = YES ⇐ ⇒ 1 d 1 = d 2 = . . . = d n = i 2 b 1 , . . . , b n is the sequence of length n in D i
Compactness How many bits to distributively encode the first n integers? Code ( n ) : (0 , i ) , (1 , i ) , (0 , i ) , . . . , (1 , i ) , (0 , i ) , (1 , i )
Compactness How many bits to distributively encode the first n integers? Code ( n ) : (0 , i ) , (1 , i ) , (0 , i ) , . . . , (1 , i ) , (0 , i ) , (1 , i ) = ⇒ 1 + log( i ) bits
Compactness How many bits to distributively encode the first n integers? Code ( n ) : (0 , i ) , (1 , i ) , (0 , i ) , . . . , (1 , i ) , (0 , i ) , (1 , i ) = ⇒ 1 + log( i ) bits where i = min { j : n < H j (1) }≤ Ack − 1 ( n ) D i H i (1)
Perfect Failure Detection from Distributed Encoding
Perfect failure detection from distributed encoding Failure detector µ P : • Encode an upper bound on the number of alive processes • Eventually converge to the (code of the) number of non-faulty processes
µ P w 1 p 1 • w 2 p 2 • p 3 x w 4 p 4 • x w 5 p 5 • epoch i epoch i + 1 • Constant fd output at each proc in each epoch • w 1 w 2 w 4 w 5 � ∗ code( a i ), where # alive(epoch i ) ≤ a i
µ P epoch 1 epoch 2 epoch ℓ a 1 a 2 a ℓ time • At most n epochs • a 1 ≥ a 2 ≥ . . . ≥ a ℓ
µ P epoch 1 epoch 2 epoch ℓ a 1 a 2 a ℓ time • At most n epochs • a 1 ≥ a 2 ≥ . . . ≥ a ℓ • a ℓ = # alive(last epoch) = # correct procs
From µ P to P Let Q = { q 1 , . . . , q 4 } ⊆ { p 1 , . . . , p n } w 1 q 1 • w 2 q 2 • w 3 q 3 • w 4 q 4 • w = w 1 w 2 w 3 w 4 epoch i a i • Recall: w � ∗ code( a i ) and | Alive (epoch i ) | ≤ a i
From µ P to P Let Q = { q 1 , . . . , q 4 } ⊆ { p 1 , . . . , p n } w 1 q 1 • w 2 q 2 • w 3 q 3 • w 4 q 4 • w = w 1 w 2 w 3 w 4 epoch i a i • Recall: w � ∗ code( a i ) and | Alive (epoch i ) | ≤ a i • Code def.: w ≺ ∗ code ( a i ) = ⇒ f ( w ) = false and f ( code ( a i )) = true
From µ P to P Let Q = { q 1 , . . . , q 4 } ⊆ { p 1 , . . . , p n } w 1 q 1 • w 2 q 2 • w 3 q 3 • w 4 q 4 • w = w 1 w 2 w 3 w 4 epoch i a i • Recall: w � ∗ code( a i ) and | Alive (epoch i ) | ≤ a i • Code def.: w ≺ ∗ code ( a i ) = ⇒ f ( w ) = false and f ( code ( a i )) = true • Hence, if f ( w ) = true then { p 1 , . . . , p n } \ Q ⊆ Faulty
Dirty Collect Let Q = { q 1 , . . . , q 4 } ⊆ { p 1 , . . . , p n } w 1 q 1 • w 2 q 2 • w 3 q 3 • w 4 q 4 w = w 1 w 2 w 3 w 4 • epoch i a i • w 1 , w 2 , w 3 , w 4 sampled in � = epochs
Dirty Collect Let Q = { q 1 , . . . , q 4 } ⊆ { p 1 , . . . , p n } w 1 q 1 • w 2 q 2 • w 3 q 3 • w 4 q 4 w = w 1 w 2 w 3 w 4 • epoch i a i • w 1 , w 2 , w 3 , w 4 sampled in � = epochs • f ( w ) = true ?? f ( w ) = false ??
Clean Collect epoch 1 epoch 2 epoch 3 epoch ℓ a 1 a 2 a 3 a 4 collect collect collect collect w 1 w 2 w 3 w 4 time • At most n epochs
Clean Collect epoch 1 epoch 2 epoch 3 epoch ℓ a 1 a 2 a 3 a 4 collect collect collect collect w 1 w 2 w 3 w 4 time • At most n epochs = ⇒ In a sequence of n collects, at least one is clean
From µ P to P epoch 1 epoch 2 epoch 3 epoch ℓ a 1 a 2 a 3 a 4 collect collect collect collect w 1 w 2 w 3 w 4 time • Collect i is successful if (1) terminates and (2) f ( w i ) = true
From µ P to P epoch 1 epoch 2 epoch 3 epoch ℓ a 1 a 2 a 3 a 4 collect collect collect collect w 1 w 2 w 3 w 4 time • Collect i is successful if (1) terminates and (2) f ( w i ) = true • If for some set Q , there are n successful collects P output = { p 1 , . . . , p n } \ Q
µ P : Summary Failure detector µ P • Outputs O (log Ack − 1 ( n )) bits per processes • Can emulate the perfect failure detector P
µ P : Summary Failure detector µ P • Outputs O (log Ack − 1 ( n )) bits per processes • Can emulate the perfect failure detector P • ( P can also emulate µ P – see the paper)
Lower Bound Failure detector µ P • Outputs O (log Ack − 1 ( n )) bits per processes
Lower Bound Failure detector µ P • Outputs O (log Ack − 1 ( n )) bits per processes Is there a f.d. D that 1 can emulate P 2 outputs less than log Ack − 1 ( n ) bits per process ?
Lower Bound Failure detector µ P • Outputs O (log Ack − 1 ( n )) bits per processes Is there a f.d. D that 1 can emulate P 2 outputs less than log Ack − 1 ( n ) bits per process ? Theorem No failure detector with constant-size output can emulate P
Lower Bound Proof Assume for contradiction D f.d. such that • Constant range R , (independant of n )
Lower Bound Proof Assume for contradiction D f.d. such that • Constant range R , (independant of n ) • T D → P (can emulate P )
Lower Bound Proof Assume for contradiction D f.d. such that • Constant range R , (independant of n ) • T D → P (can emulate P ) Ingredients • Ramsey’s theorem • Well quasi-order theory
Goal Construct two executions e and e ′ : • indistinguishable for some non-faulty processes • with Correct ( e ) � Correct ( e ′ )
Goal Construct two executions e and e ′ : • indistinguishable for some non-faulty processes • with Correct ( e ) � Correct ( e ′ ) = ⇒ in e ′ T D → P erroneously outputs a non-faulty process
From Executions to Words Let e an (infinite) execution d 1 d 2 d 3 d 4 d 5 d 6 d 7 q • • • • • • • • As R D is finite, ∃ d ∈ D output infinitely many times at q
From Executions to Words Let e an (infinite) execution d 2 d 3 d 5 d 7 d d d q • • • • • • • • As R D is finite, ∃ d ∈ D output infinitely many times at q
From Executions to Words Let e an (infinite) execution d 2 d 3 d 5 d 7 d d d q • • • • • • • • As R D is finite, ∃ d ∈ D output infinitely many times at q Execution ˜ e d d d q • • • • Constant failure detector output
From Executions to Words Let e an (infinite) execution in which crashes are initial q 1 q 2 x q 3 q 4 x q 5
From Executions to Words Let e an (infinite) execution in which crashes are initial d 1 d 1 d 1 d 1 q 1 • • • • q 2 x d 3 d 3 d 3 d 3 d 3 q 3 • • • • • q 4 x d 5 d 5 d 5 d 5 q 5 • • • • Constant f.d. output ( d i ) at each non-faulty process q i
From Executions to Words Let e an (infinite) execution in which crashes are initial d 1 d 1 d 1 d 1 q 1 • • • • q 2 x d 3 d 3 d 3 d 3 d 3 q 3 • • • • • q 4 x d 5 d 5 d 5 d 5 q 5 • • • • Constant f.d. output ( d i ) at each non-faulty process q i e − → w e = d 1 d 3 d 5 ∈ R ∗ D
Towards Indistinguishable Executions execution associated word ∈ R ∗ D e 1 w 1 e 2 w 2 | w i | = i e 3 w 3 . . . . ... . . . . . . . . e L w L
Towards Indistinguishable Executions execution associated word ∈ R ∗ D e 1 w 1 e 2 w 2 | w i | = i e 3 w 3 . . . . ... . . . . . . . . e L w L • (Higman’s Lemma) ( R ∗ D � ∗ ) is a wqo
Towards Indistinguishable Executions execution associated word ∈ R ∗ D e 1 w 1 e 2 w 2 | w i | = i e 3 w 3 . . . . ... . . . . . . . . e L w L • (Higman’s Lemma) ( R ∗ D � ∗ ) is a wqo = ⇒ For large enough L , ∃ i , j : 1 ≤ i < j ≤ L and w i subword of w j
Towards Indistinguishable Executions execution e ′ w ′ = x ab y c execution e x x x x w = abc q ′ • • • • 1 a a a a a a a a q 1 • • • • • • • • q ′ 2 b b b b b b b b q 2 • • • • q ′ • • • • 3 y y y y c c c c q 3 • • • • q ′ • • • • 4 c c c c • • • • q ′ 5 .
Towards Indistinguishable Executions execution e ′ w ′ = x ab y c execution e x x x x w = abc q ′ • • • • 1 a a a a a a a a q 1 • • • • • • • • q ′ 2 b b b b b b b b q 2 • • • • q ′ • • • • 3 y y y y c c c c q 3 • • • • q ′ • • • • 4 c c c c • • • • q ′ 5 a (or b , c ) may be output at processes with distinct ids in e and e ′ .
Recommend
More recommend