on models which are not fundamentally different3 similaries and reducons safe bits ≅ atomic...

20
WF=NWF? On Models which are not Fundamentally Different Petr Kuznetsov TU Berlin/DT‐Labs (Joint work with Eli Gafni, UCLA)

Upload: others

Post on 17-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

WF=NWF?  On Models which are not Fundamentally Different   

Petr Kuznetsov TU Berlin/DT‐Labs 

(Joint work with Eli Gafni, UCLA)P 

Page 2: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

2

Distributed modeling jumble 

CAS,   LL/SC? 

RW shared memory?  

Message passing?  

Snapshot  memory?  

 Sub‐consensus objects? 

Clouds, data centers…? 

 t‐resilience ? 

Page 3: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

3

SimilariWes and reducWons 

  Safe bits ≅ atomic read‐write registers [Lam85] 

  Atomic read‐write ≅ atomic snapshots [Afek et al, 93] 

  Message‐passing ≅ Shared‐memory [ABD95] 

  Atomic read‐write ≅ Immediate snapshots [BG93] 

  Atomic read‐write ≅ Iterated Immediate Snapshots (NB) [BG93] 

  t‐resilience ≅ wait‐freedom [BG93,Gafni09] 

Page 4: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

4

Model equivalence Models M and M’ are fundamentally equivalent if for every task T there exists a task T’(T,M’) 

T is solvable in M               T’(T,M) is solvable in M’ 

(Solvability in M can be reduced to solvability in M’) 

Page 5: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

5

Distributed tasks (I,O,Δ) 

  I – set of input vectors   O – set of output vectors   Task specificaWon Δ: I→2O

k‐set agreement 

  Processes start with inputs in V (|V|>k)   The set of outputs is a subset of inputs of size at most k   k=1: consensus 

Page 6: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

6

Conjecture   All (natural) models are fundamentally equivalent to the wait‐free model (WF) 

K-concurrency: output if at most k processes concur

L‐resilience: output if a set in L is live 

Page 7: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

7

The wait‐free model: 2 processes 

P Q

P reads before  

Q writes P reads amer  

Q writes 

Q reads amer  

P writes Q reads before  

P writes 

while not done  

 write(view) 

 view := collect‐memory() 

Wait‐free consensus is impossible! 

Page 8: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

8

The wait‐free model: 3 processes 

P Q

R

Page 9: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

9

The wait‐free model: 3 processes 

P Q

R

Page 10: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

10

The wait‐free model: 3 processes 

P Q

R

Wait‐free 2‐set agreement  is impossible! 

Page 11: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

11

Why wait‐freedom? 

  Simple structure: contains all possible interleavings  WF compuWng: a process makes progress, regardless of others     

  WF solvability has a precise topological characterizaWon [Herlihy‐Shavit,99]  A conWnuous map from a subdivision to the outputs 

 Undecidable for >2 processes [HR97,GK99] 

Page 12: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

12

L‐resilience 

L is a set of process subsets 

The power of L is characterized by its hiqng set size hs(L)! 

p  q  r  s 

Hiqng set of L L={p,qr,rs} 

p  q  r  s 

Page 13: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

13

L‐resilience: defining T’(T,L)   A process in T’(T,L) is a tuple (i,S)   

 i = 1,…,hs(L)  S in L 

  (I,S) outputs a value for each process in S: an output of T or “?”  All outputs are consistent with T 

  If (i,S) decides, then    there is (j,S’) such that S is subset of S’  or hs(L’)≤i‐1, L’ – the set of “undecided” sets in L    

Page 14: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

14

RelaWng T and T’(T,L): simulaWng many by few 

   hs(L) processes in T’(T,L) simulate an L‐resilient execuWon:  (1,S),…,(hs(L),S) 

  If (eventually) the number of simulators is j and  the number of simulated processes is m, then at least m‐j+1 simulated processes make progress [Gaf09] 

Page 15: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

15

SimulaWng L‐resilience 

L={p,qr,rs}   hs(L)=2  at most two simulators, (1,S) and (2,S)  one faulty simulator cannot block all sets in L: at least one set in L is live   

p  q  r  s p  q  r  s 

{q,r} and {r,s} cannot be live 

but {p} can! 

Page 16: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

16

K‐concurrency   Output if at most k processes run concurrently 

 Equivalent to WF with k‐set agreement objects 

 k=1: consensus, every task is solvable 

  RelaWng WF and k‐concurrency:  Simulate few by many  

 k‐state machines [Guerraoui, Gafni ‘10] 

Page 17: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

17

Filling the gap 

  L‐resilience ≅ WF 

  K‐concurrency ≅ WF 

p  q  r  s 

What about generic adversaries [Delporte et al.,2009]? 

A= {p,qr,rs} 

Page 18: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

18

On natural models   Natural: restricted wait‐free  Adversaries  DeterminisWc objects 

P Q

R

  “Unnatural”  “Sub‐agreement” objects 

Page 19: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

19

It’s WF! 

Page 20: On Models which are not Fundamentally Different3 Similaries and reducons Safe bits ≅ atomic read‐write registers [Lam85] Atomic read‐write ≅ atomic snapshots [Afek et al,

20

THANK YOU!