Sequential Consistency Versus Linearizability Hagit A(ya, - - PowerPoint PPT Presentation

sequential consistency versus linearizability
SMART_READER_LITE
LIVE PREVIEW

Sequential Consistency Versus Linearizability Hagit A(ya, - - PowerPoint PPT Presentation

Sequential Consistency Versus Linearizability Hagit A(ya, and Jennifer L. Welch (ACM Transac<ons on Computer Systems 1994) Presented by: Haonan Lu 0


slide-1
SLIDE 1

Sequential ¡ Consistency ¡Versus ¡ Linearizability ¡

Hagit ¡A(ya, ¡and ¡Jennifer ¡L. ¡Welch ¡

(ACM ¡Transac<ons ¡on ¡Computer ¡Systems ¡1994) ¡ Presented ¡by: ¡Haonan ¡Lu ¡

0 ¡

slide-2
SLIDE 2

Problem ¡

  • No ¡quan<ta<ve ¡study ¡previously ¡existed ¡on ¡the ¡comparison ¡of ¡

linearizability ¡and ¡sequen<al ¡in ¡terms ¡of ¡the ¡costs ¡of ¡their ¡ distributed ¡implementa<ons. ¡

  • Similar ¡defini<ons ¡lead ¡to ¡confusion ¡about ¡their ¡implementa<ons ¡

¡

  • Cost ¡– ¡response ¡<me ¡

¡

1 ¡

slide-3
SLIDE 3

Problem ¡

  • ­‑-­‑ ¡compare ¡with ¡primary ¡paper ¡
  • The ¡primary ¡
  • Defini<ons ¡of ¡linearizability, ¡proofs ¡of ¡its ¡correctness, ¡and ¡its ¡

proper<es ¡

  • Men<oned ¡sequen<al ¡consistency ¡(Lamport’s ¡“How ¡to ¡make ¡a ¡

mul<processor ¡computer ¡that ¡correctly ¡executes ¡mul<process ¡ programs”) ¡

  • This ¡Paper ¡
  • Focuses ¡on ¡the ¡cost ¡of ¡their ¡implementa<ons. ¡ ¡
  • Make ¡it ¡clearer ¡how ¡they ¡are ¡different ¡from ¡each ¡other ¡

¡

2 ¡

slide-4
SLIDE 4

Key ¡Techniques ¡

  • Objects ¡
  • Read/Write ¡objects ¡
  • FIFO ¡queue ¡
  • Stacks ¡
  • System ¡model ¡
  • Networked ¡nodes ¡
  • MCS ¡process ¡on ¡each ¡node ¡
  • Process ¡contains ¡some ¡events ¡which ¡represent ¡the ¡system ¡

behavior ¡

  • Theorems ¡claim ¡the ¡results ¡– ¡lower/upper ¡bounds ¡on ¡

response ¡<me ¡

  • Mathema<cal ¡proofs ¡– ¡correctness ¡of ¡the ¡results ¡

¡

3 ¡

slide-5
SLIDE 5

Key ¡Technique ¡

  • ­‑-­‑ ¡how ¡related ¡to ¡primary ¡
  • Primary: ¡
  • Provides ¡defini<ons ¡
  • Claims ¡proper<es ¡and ¡mathema<cally ¡proves ¡them ¡

¡ ¡

  • This ¡paper: ¡
  • Follows ¡the ¡defini<ons ¡provided ¡by ¡primary ¡
  • Claims ¡results ¡(upper/lower ¡bounds), ¡and ¡proves ¡the ¡correctness ¡

4 ¡

slide-6
SLIDE 6

Key ¡Findings ¡

  • u ¡= ¡uncertainty ¡<me ¡
  • Every ¡message ¡incurs ¡a ¡delay ¡in ¡the ¡interval ¡[d-­‑u, ¡d], ¡where ¡u ¡= ¡[0, ¡d] ¡

for ¡imperfect ¡clocks, ¡and ¡u ¡= ¡0 ¡for ¡perfect ¡clocks. ¡

  • h ¡= ¡start ¡<me ¡for ¡a ¡slow ¡opera<on ¡
  • E.g., ¡fast ¡ops ¡start ¡at ¡<me ¡0, ¡slow ¡ops ¡start ¡no ¡later ¡than ¡<me ¡h. ¡ ¡ ¡
  • d ¡= ¡message ¡delay ¡

Imperfect ¡Clock ¡ Perfect ¡Clock ¡

Linearizable ¡(Lower) ¡ Sequen<al ¡(Upper) ¡ Linearizable(Upper) ¡ Sequen<al(Lower) ¡

r/w ¡obj ¡ Read ¡ Write ¡ Read ¡ Write ¡ Read ¡ Write ¡ Read ¡ Write ¡ u/4 ¡ u/2 ¡ 0 ¡or ¡h ¡ h ¡or ¡0 ¡ 0 ¡or ¡d ¡ d ¡or ¡0 ¡ |R| ¡+ ¡|W| ¡>= ¡d ¡ FIFO ¡ DeQ ¡ EnQ ¡ DeQ ¡ EnQ ¡ DeQ ¡ EnQ ¡ DeQ ¡ EnQ ¡

  • ­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑ ¡

u/2 ¡ h ¡ 0 ¡ d ¡ 0 ¡ d ¡

  • ­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑ ¡

Stack ¡ Pop ¡ Push ¡ Pop ¡ Push ¡ Pop ¡ Push ¡ Pop ¡ Push ¡

  • ­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑ ¡

u/2 ¡ h ¡ 0 ¡ d ¡ 0 ¡ d ¡

  • ­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑ ¡

5 ¡

slide-7
SLIDE 7

Findings ¡

  • ­‑-­‑Theorem ¡4.1 ¡ ¡
  • For ¡any ¡MCS ¡that ¡is ¡a ¡sequen<ally ¡consistent ¡implementa<on ¡
  • f ¡two ¡read/write ¡objects ¡X ¡and ¡Y, ¡|Write|+ ¡|Read| ¡> ¡d. ¡
  • The ¡way ¡the ¡paper ¡proves ¡it ¡(by ¡contradic<on) ¡
  • P(a) ¡: ¡write(X)1 ¡ ¡ ¡-­‑> ¡ ¡ ¡ ¡ ¡read(Y)0 ¡

¡

  • P(b): ¡write(Y)1 ¡ ¡ ¡ ¡-­‑> ¡ ¡ ¡ ¡ ¡read(X)0 ¡

¡ ¡ 6 ¡

slide-8
SLIDE 8

Take-­‑away ¡

  • With ¡imperfect ¡clocks ¡(normal ¡case ¡in ¡distributed ¡systems) ¡
  • Linearizability ¡is ¡more ¡expensive ¡than ¡sequen<al ¡
  • With ¡synchronized ¡clocks ¡
  • Linearizability ¡and ¡sequen<al ¡are ¡equally ¡costly ¡
  • For ¡sequen<ally ¡consistent ¡mul<-­‑object ¡systems ¡with ¡perfect ¡

clocks, ¡|read| ¡+ ¡|write| ¡> ¡d, ¡where ¡d ¡is ¡message ¡delay. ¡

  • The ¡table ¡of ¡upper/lower ¡bounds ¡for ¡different ¡objects ¡

7 ¡