contention related crash failures ana s durand
play

Contention-Related Crash Failures Anas Durand LIP6, Sorbonne - PowerPoint PPT Presentation

Contention-Related Crash Failures Anas Durand LIP6, Sorbonne Universit, Paris April 1st, 2019 1 / 25 Anas Durand Contention-Related Crash Failures Set Agreement and Renaming in the Presence of Contention-Related Crash Failures SSS 2018


  1. Contention-Related Crash Failures Anaïs Durand LIP6, Sorbonne Université, Paris April 1st, 2019 1 / 25 Anaïs Durand Contention-Related Crash Failures

  2. Set Agreement and Renaming in the Presence of Contention-Related Crash Failures SSS 2018 Joint work with: Michel Raynal Gadi Taubenfeld 2 / 25 Anaïs Durand Contention-Related Crash Failures

  3. Computational Model � Asynchronous deterministic system � n processes p 1 , . . . , p n � Atomic read/write registers � 0 ≤ t < n process crashes � Participation required 3 / 25 Anaïs Durand Contention-Related Crash Failures

  4. Process crashes 2 kinds of process crashes usually considered: � Initially dead processes � “Classical” ( any-time ) crashs: no constraints 4 / 25 Anaïs Durand Contention-Related Crash Failures

  5. Contention-Related Crash Failures [ Taubenfeld,18 ] � Contention = # processes that accessed a shared register ≈ # processes that started to compute � λ = predefined contention threshold � 2 possible definitions: No crashes contention λ No crashes contention λ 5 / 25 Anaïs Durand Contention-Related Crash Failures

  6. Contention-Related Crash Failures [ Taubenfeld,18 ] � Contention = # processes that accessed a shared register ≈ # processes that started to compute � λ = predefined contention threshold � 2 possible definitions: λ -constrained crashes No crashes contention λ No crashes contention λ 5 / 25 Anaïs Durand Contention-Related Crash Failures

  7. Contention-Related vs. Any-Time Crash Failures � Consensus: ◮ [ Fischer et al. , 85 ] : Impossible with one any-time crash failure. ◮ [ Taubenfeld, 18 ] : Algorithm that tolerates one ( n − 1 ) -constrained crash failure for n > 1. � k -Set Agreement, 1 ≤ k < n : ◮ [ Borowsky, Gafni, 93 ] : Impossible with k any-time crash failures. ◮ [ Taubenfeld, 18 ] : Algorithm that tolerates ℓ + k − 2 ( n − ℓ ) -constrained crash failures for ℓ ≥ 1 and n ≥ 2 ℓ + k − 2. 6 / 25 Anaïs Durand Contention-Related Crash Failures

  8. Motivation Consider a problem P that can be solved with t any-time crash failures, but impossible with t + 1 any-time crash failures. Given λ , can P be solved with both t 1 λ -constrained and t 2 ≤ t any-time crash failures, with t 1 + t 2 > t ? We consider here: k -set agreement (for k ≥ 2) and renaming 7 / 25 Anaïs Durand Contention-Related Crash Failures

  9. k -Set Agreement 8 / 25 Anaïs Durand Contention-Related Crash Failures

  10. k -Set Agreement [ Chaudhuri,90 ] Definition � One-shot object � Operation propose ( v ) : propose value v and return a decided value � Properties: ◮ Validity: decided value ∈ proposed values ◮ Agreement: ≤ k decided values ◮ Termination: every correct process decides 9 / 25 Anaïs Durand Contention-Related Crash Failures

  11. k -Set Agreement Algorithm: Properties � λ = n − k � k ≥ 2 � k = m + f , m ≥ 0, f ≥ 1 total # of faults t = 2 m + f − 1 = k + m − 1 λ -constrained crashes 2 m any-time crashes f − 1 [ Borowsky, Gafni, 93 ] : Impossible with k any-time crash failures. 10 / 25 Anaïs Durand Contention-Related Crash Failures

  12. k -Set Agreement: Parameters Parameters f and m allow the user to tune the proportion of each type of crash failures. max #any-time (= k -1 ) 0 k -1 m t = k − 1 1 k f � k � 0 k -1 2 m � k � k � k � � � t = 2 + − 1 1 k 2 2 2 f 0 k -1 m t = 2 k − 2 1 k f max # λ -constrained (= 2 k -2 ) 11 / 25 Anaïs Durand Contention-Related Crash Failures

  13. k -Set Agreement: Shared Registers (1 / 2) � DEC : atomic register, initially ⊥ � PART [ 1 . . . n ] : snapshot object, initially [ down , . . . , down ] ◮ Atomic (linearizable) operations write () and snapshot () ◮ ≈ array of single-writer multi-reader atomic registers PART [ 1 . . . n ] such that: • p i invokes write ( v ) = writes v into PART [ i ] • p i invokes snapshot () = obtains the value of the array PART [ 1 . . . n ] as if it read simultaneously and instantaneously all its entries 12 / 25 Anaïs Durand Contention-Related Crash Failures

  14. k -Set Agreement: Shared Registers (2 / 2) � MUTEX [ 1 ] : one-shot deadlock-free f -mutex � MUTEX [ 2 ] : one-shot deadlock-free m -mutex ◮ Operations acquire () and release () (invoked at most once) ◮ Properties: • Mutual exclusion: ≤ m processes simultaneously in critical section • Deadlock-freedom: if < m processes crashes, then ≥ 1 process invoking acquire () terminates its invocation 13 / 25 Anaïs Durand Contention-Related Crash Failures

  15. k -Set Agreement Algorithm (1/2) operation propose ( in i ) is PART . write ( up ) ; % signal participation (1) 14 / 25 Anaïs Durand Contention-Related Crash Failures

  16. k -Set Agreement Algorithm (1/2) operation propose ( in i ) is PART . write ( up ) ; % signal participation (1) repeat (2) part i := PART . snapshot () ; % wait for n − t (3) count i := |{ x such that part i [ x ] = up }| ; % participants (4) until count i ≥ n − t end repeat ; (5) 14 / 25 Anaïs Durand Contention-Related Crash Failures

  17. k -Set Agreement Algorithm (1/2) operation propose ( in i ) is PART . write ( up ) ; % signal participation (1) repeat (2) part i := PART . snapshot () ; % wait for n − t (3) count i := |{ x such that part i [ x ] = up }| ; % participants (4) until count i ≥ n − t end repeat ; (5) if count i ≤ λ then % split processes into groups (6) group i := 2; % � MUTEX [ 2 ] (m-mutex) (7) else (8) group i := 1; (9) % � MUTEX [ 1 ] (f-mutex) end if (10) 14 / 25 Anaïs Durand Contention-Related Crash Failures

  18. k -Set Agreement Algorithm (1/2) operation propose ( in i ) is PART . write ( up ) ; % signal participation (1) repeat (2) part i := PART . snapshot () ; % wait for n − t (3) count i := |{ x such that part i [ x ] = up }| ; % participants (4) until count i ≥ n − t end repeat ; (5) if count i ≤ λ then % split processes into groups (6) group i := 2; % � MUTEX [ 2 ] (m-mutex) (7) else (8) group i := 1; (9) % � MUTEX [ 1 ] (f-mutex) end if (10) launch in // the threads T 1 and T 2 ; (11) 14 / 25 Anaïs Durand Contention-Related Crash Failures

  19. k -Set Agreement Algorithm (2/2) thread T 1 is % wait for a decided value loop forever (12) if DEC � = ⊥ then (13) return ( DEC ); (14) end if ; (15) end loop ; (16) 15 / 25 Anaïs Durand Contention-Related Crash Failures

  20. k -Set Agreement Algorithm (2/2) thread T 1 is % wait for a decided value loop forever (12) if DEC � = ⊥ then (13) return ( DEC ); (14) end if ; (15) end loop ; (16) thread T 2 is % decide a value if enters its CS if group i = 1 ∨ m > 0 then (17) MUTEX [ group i ] . acquire () ; (18) if DEC = ⊥ then (19) DEC := in i ; (20) end if (21) MUTEX [ group i ] . release () ; (22) return ( DEC ) ; (23) end if ; (24) 15 / 25 Anaïs Durand Contention-Related Crash Failures

  21. k -Set Agreement Algorithm: Validity & Agreement thread T 1 is loop forever (12) if DEC � = ⊥ then (13) return ( DEC ); a Decided value = DEC (14) end if ; (15) end loop ; (16) thread T 2 is if group i = 1 ∨ m > 0 then (17) MUTEX [ group i ] . acquire () ; (18) if DEC = ⊥ then (19) DEC := in i ; (20) end if (21) MUTEX [ group i ] . release () ; (22) return ( DEC ) ; (23) end if ; (24) 16 / 25 Anaïs Durand Contention-Related Crash Failures

  22. k -Set Agreement Algorithm: Validity & Agreement thread T 1 is loop forever (12) if DEC � = ⊥ then (13) return ( DEC ); a Decided value = DEC (14) end if ; (15) end loop ; (16) b DEC assigned to proposed thread T 2 is values in i in CS if group i = 1 ∨ m > 0 then (17) MUTEX [ group i ] . acquire () ; (18) if DEC = ⊥ then (19) DEC := in i ; (20) end if (21) MUTEX [ group i ] . release () ; (22) return ( DEC ) ; (23) end if ; (24) 16 / 25 Anaïs Durand Contention-Related Crash Failures

  23. k -Set Agreement Algorithm: Validity & Agreement thread T 1 is loop forever (12) if DEC � = ⊥ then (13) return ( DEC ); a Decided value = DEC (14) end if ; (15) end loop ; (16) b DEC assigned to proposed thread T 2 is values in i in CS if group i = 1 ∨ m > 0 then (17) MUTEX [ group i ] . acquire () ; (18) c MUTEX [ 1 ] � ≤ f � = values if DEC = ⊥ then (19) MUTEX [ 2 ] � ≤ m � = values DEC := in i ; (20) end if (21) ⇒ ≤ f + m = k decided values MUTEX [ group i ] . release () ; (22) return ( DEC ) ; (23) end if ; (24) 16 / 25 Anaïs Durand Contention-Related Crash Failures

  24. k -Set Agreement Algorithm: Termination (1/5) PART . write ( up ) ; (1) repeat (2) part i := PART . snapshot () ; (3) count i := |{ x such that part i [ x ] = up }| ; (4) until count i ≥ n − t end repeat ; (5) a ≤ t crashes + participation required � eventually count i ≥ n − t at every correct process p i 17 / 25 Anaïs Durand Contention-Related Crash Failures

  25. k -Set Agreement Algorithm: Termination (1/5) PART . write ( up ) ; (1) repeat (2) part i := PART . snapshot () ; (3) count i := |{ x such that part i [ x ] = up }| ; (4) until count i ≥ n − t end repeat ; (5) if count i ≤ λ then (6) group i := 2; (7) else (8) group i := 1; (9) end if (10) a ≤ t crashes + participation required � eventually count i ≥ n − t at every correct process p i b ≤ n − k processes with count i ≤ n − k = λ when leaving loop (2)-(5) � ≤ n − k processes in group 2 17 / 25 Anaïs Durand Contention-Related Crash Failures

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend