the weakest failure detectors to boost obstruction freedom
play

The Weakest Failure Detectors to Boost Obstruction-Freedom Rachid - PowerPoint PPT Presentation

The Weakest Failure Detectors to Boost Obstruction-Freedom Rachid Guerraoui 1 Micha Kapaka 1 Petr Kouznetsov 2 1 EPFL, Switzerland 2 MPI-SWS, Germany DISC 2006, 20.IX 2006 Micha Kapaka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX


  1. The Weakest Failure Detectors to Boost Obstruction-Freedom Rachid Guerraoui 1 Michał Kapałka 1 Petr Kouznetsov 2 1 EPFL, Switzerland 2 MPI-SWS, Germany DISC 2006, 20.IX 2006 Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 1 / 13

  2. Introduction Problems with Concurrent Programming Multi-processor/-core ⇒ process p 1 synchronization techniques essential Ideal implementations of shared operation op 1 objects: Linearizable (atomic) Shared object + Wait-free or operation op 2 Non-blocking (lock-free) process p 2 Wait-free = progress for everyone Non-blocking = progress for someone Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 2 / 13

  3. Introduction Problems with Wait-Freedom/Non-blockingness But wait-free/non-blocking + linearizable algorithms: Difficult to design Difficult to optimize for average case = low contention Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 3 / 13

  4. Obstruction-Freedom and Contention Management Solution: Separation of Concerns Two independent modules: 1 Obstruction-free (OF) algorithm ⇒ safety + minimal liveness Must always return correct results (linearizability) Obstruction-freedom: progress guaranteed only when no contention 2 Contention manager (CM) ⇒ boosts liveness CM has limited power ⇒ safety always preserved, even when CM behaves badly. The idea adopted by OF software transactional memory Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 4 / 13

  5. Obstruction-Freedom and Contention Management Contention Manager process p i OF communicates with CM only via calls try and resign (no parameters, operation op k return OK) But CM cannot mess up with safety OF algorithm ⇒ CM can only delay a process that calls try to help other processes try i / resign i try = when operation starts or when contention CM resign = when operation completes Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 5 / 13

  6. Obstruction-Freedom and Contention Management Providing Wait-Freedom Our focus: CM that guarantees wait-freedom or non-blockingness How? By allowing each (some) process to run its operation in isolation sufficiently long How long is sufficiently long? Asynchronous system ⇒ no upper bound ⇒ until the operation is completed, or the process crashes Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 6 / 13

  7. Obstruction-Freedom and Contention Management Wait-Free CM – an Example Process p 1 Process p 2 starts op 1 starts op 1 suspended p 1 has to be blocked runs alone indefinitely long ( p 2 may be completes op 1 continues very slow). contention But if p 2 crashes, p 1 cannot starts op 2 suspended remain blocked forever! runs alone CM needs some information completes op 2 continues about failures. . . . . . . Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 7 / 13

  8. Obstruction-Freedom and Contention Management Wait-Free CM – an Example Process p 1 Process p 2 starts op 1 starts op 1 suspended p 1 has to be blocked runs alone indefinitely long ( p 2 may be completes op 1 continues very slow). contention But if p 2 crashes, p 1 cannot starts op 2 suspended runs alone remain blocked forever! completes op 2 continues CM needs some information . . . . . . about failures. blocked by CM runs alone completes op 1 Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 7 / 13

  9. Obstruction-Freedom and Contention Management Wait-Free CM – an Example Process p 1 Process p 2 starts op 1 starts op 1 suspended p 1 has to be blocked runs alone indefinitely long ( p 2 may be completes op 1 continues very slow). contention But if p 2 crashes, p 1 cannot starts op 2 suspended runs alone remain blocked forever! completes op 2 continues CM needs some information . . . . . . about failures. blocked by CM runs alone continues CRASHES Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 7 / 13

  10. Obstruction-Freedom and Contention Management The Question Question What is the minimal amount of information about failures needed to guarantee wait-freedom using a CM? Answer Information about failures has to be eventually accurate ( ♦ P ). Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 8 / 13

  11. Obstruction-Freedom and Contention Management The Question Question What is the minimal amount of information about failures needed to guarantee wait-freedom using a CM? Answer Information about failures has to be eventually accurate ( ♦ P ). Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 8 / 13

  12. Wait-Free CM Proof Sketch Sufficiency Part Basic idea: make processes execute operations one by one ⇒ no contention initially : T [ 1 , . . . , n ] ← ⊥ upon try i do if T [ i ] = ⊥ then T [ i ] ← GetTimestamp() repeat leader i ← the non-crashed process that announced the lowest non- ⊥ ts in T until leader i = i upon resign i do T [ i ] ← ⊥ Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 9 / 13

  13. Wait-Free CM Proof Sketch Necessity Part The main idea: We have an algorithm C implementing a CM that guarantees wait-freedom. For every pair of processes p i and p j ( p i never crashes) we want that: 1 If p j crashes, then p i eventually permanently suspects p j , 2 If p j never crashes, then p i eventually stops suspecting p j forever. We make p i and p j invoke try and resign on C ⇒ simulate an execution of an OF algorithm Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 10 / 13

  14. Wait-Free CM Proof Sketch Necessity Part (2) Process p i Process p j try i try j suspect p j inc R j wait for inc R j stop suspecting p j try j resign i inc R j . . . try i suspect p j . . . Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 11 / 13

  15. Wait-Free CM Proof Sketch Necessity Part (2) Process p i Process p j try i try j suspect p j inc R j wait for inc R j stop suspecting p j try j If p j crashes: p i suspects p j and resign i CRASHES waits for R j forever try i suspect p j wait for inc R j Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 11 / 13

  16. Wait-Free CM Proof Sketch Necessity Part (2) If p j never crashes: Process p i Process p j CM must eventually make p j try i try j perform steps alone suspect p j inc R j ⇒ block p i until p j resigns, wait for inc R j But p j never resigns ⇒ p i stop suspecting p j try j blocked forever, resign i inc R j not suspecting p i , . . . try i A subtlety: OF is violated then, blocked by CM but if CM releases p i ∞ many times, OF holds and CM violates wait-freedom. Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 11 / 13

  17. Summary Contribution Main results: 1 ♦ P is the weakest failure detector to implement a wait-free contention manager 2 Ω ∗ is the weakest failure detector to implement a non-blocking contention manager ( Ω ≺ Ω ∗ ≺ ♦ P ) But also: 1 Separation of concerns has a cost 2 Prove that wait-freedom is more difficult than non-blockingness 3 Give a precise model of interaction between obstruction-free algorithm and contention manager Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 12 / 13

  18. Summary Related Work We do not consider overhead of CM Some discussion + wait-free CM algorithm: Fich et al. (DISC’05) More about overhead: see our companion paper (EPFL technical report) Michał Kapałka (EPFL) The Weakest FD to Boost OF DISC 2006, 20.IX 2006 13 / 13

Recommend


More recommend