local linearizability
play

Local Linearizability Ana Sokolova joint work with: Andreas Haas - PowerPoint PPT Presentation

Local Linearizability Ana Sokolova joint work with: Andreas Haas Tom Henzinger Andreas Holzer Christoph Kirsch Michael Lippautz Hannes Payer Ali Sezgin Helmut Veith Rigorous methods for engineering of and reasoning about reactive


  1. Local Linearizability main idea Already present in some shared-memory consistency conditions (not in our form of choice) • Partition a history into a set of local histories • Require linearizability per local history Ana Sokolova CiiT 2018

  2. Local Linearizability main idea Already present in some shared-memory consistency conditions (not in our form of choice) • Partition a history into a set of local histories • Require linearizability per local history Local sequential consistency… is also possible Ana Sokolova CiiT 2018

  3. Local Linearizability main idea Already present in some shared-memory consistency conditions (not in our form of choice) • Partition a history into a set of local histories • Require linearizability per local history Local sequential consistency… is also possible no global witness Ana Sokolova CiiT 2018

  4. Local Linearizability (queue) example t1: enq(1) deq(2) t2: enq(2) deq(1) Ana Sokolova CiiT 2018

  5. Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) Ana Sokolova CiiT 2018

  6. Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) Ana Sokolova CiiT 2018

  7. Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) t1-induced history, linearizable Ana Sokolova CiiT 2018

  8. Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) t1-induced history, linearizable Ana Sokolova CiiT 2018

  9. Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) t2-induced history, t1-induced history, linearizable linearizable Ana Sokolova CiiT 2018

  10. Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) t2-induced history, t1-induced history, linearizable linearizable locally linearizable Ana Sokolova CiiT 2018

  11. Local Linearizability (queue) definition Ana Sokolova CiiT 2018

  12. Local Linearizability (queue) definition Queue signature ∑ = {enq(x) | x ∈ V} ∪ {deq(x) | x ∈ V} ∪ {deq(empty)} Ana Sokolova CiiT 2018

  13. Local Linearizability (queue) definition Queue signature ∑ = {enq(x) | x ∈ V} ∪ {deq(x) | x ∈ V} ∪ {deq(empty)} For a history h with a thread T, we put I T = {enq(x) T ∈ h | x ∈ V} O T = {deq(x) T’ ∈ h | enq(x) T ∈ I T } ∪ {deq(empty)} Ana Sokolova CiiT 2018

  14. Local Linearizability (queue) definition Queue signature ∑ = {enq(x) | x ∈ V} ∪ {deq(x) | x ∈ V} ∪ {deq(empty)} in-methods of thread T For a history h with a thread T, we put are enqueues performed I T = {enq(x) T ∈ h | x ∈ V} by thread T O T = {deq(x) T’ ∈ h | enq(x) T ∈ I T } ∪ {deq(empty)} Ana Sokolova CiiT 2018

  15. Local Linearizability (queue) definition Queue signature ∑ = {enq(x) | x ∈ V} ∪ {deq(x) | x ∈ V} ∪ {deq(empty)} in-methods of thread T For a history h with a thread T, we put are enqueues performed I T = {enq(x) T ∈ h | x ∈ V} by thread T O T = {deq(x) T’ ∈ h | enq(x) T ∈ I T } ∪ {deq(empty)} out-methods of thread T are dequeues (performed by any thread) corresponding to enqueues that are in-methods Ana Sokolova CiiT 2018

  16. Local Linearizability (queue) definition Queue signature ∑ = {enq(x) | x ∈ V} ∪ {deq(x) | x ∈ V} ∪ {deq(empty)} in-methods of thread T For a history h with a thread T, we put are enqueues performed I T = {enq(x) T ∈ h | x ∈ V} by thread T O T = {deq(x) T’ ∈ h | enq(x) T ∈ I T } ∪ {deq(empty)} out-methods of thread T are dequeues (performed by any thread) corresponding to enqueues that are in-methods h is locally linearizable iff every thread-induced history h T = h | (I T ∪ O T ) is linearizable. Ana Sokolova CiiT 2018

  17. Generalizations of Local Linearizability Ana Sokolova CiiT 2018

  18. Generalizations of Local Linearizability Signature ∑ Ana Sokolova CiiT 2018

  19. Generalizations of Local Linearizability Signature ∑ For a history h with n threads, choose In h (i) Out h (i) Ana Sokolova CiiT 2018

  20. Generalizations of Local Linearizability Signature ∑ For a history h with n threads, choose in-methods of thread i, methods that go in h i In h (i) Out h (i) Ana Sokolova CiiT 2018

  21. Generalizations of Local Linearizability Signature ∑ For a history h with n threads, choose in-methods of thread i, methods that go in h i In h (i) Out h (i) out-methods of thread i, dependent methods on the methods in In h (i) (performed by any thread) Ana Sokolova CiiT 2018

  22. Generalizations of Local Linearizability Signature ∑ For a history h with n threads, choose in-methods of thread i, methods that go in h i In h (i) Out h (i) out-methods of thread i, dependent methods on the methods in In h (i) (performed by any thread) h is locally linearizable iff every thread-induced history h i = h | (In h (i) ∪ Out h (i)) is linearizable. Ana Sokolova CiiT 2018

  23. Generalizations of Local Linearizability Signature ∑ For a history h with n threads, choose in-methods of thread i, methods that go in h i In h (i) Out h (i) by increasing the in-methods, out-methods of thread i, LL gradually moves to dependent methods linearizability on the methods in In h (i) (performed by any thread) h is locally linearizable iff every thread-induced history h i = h | (In h (i) ∪ Out h (i)) is linearizable. Ana Sokolova CiiT 2018

  24. Where do we stand? In general Linearizability Local Linearizability Sequential Consistency Ana Sokolova CiiT 2018

  25. Where do we stand? For queues (and most container-type data structures) Linearizability Local Linearizability Sequential Consistency Ana Sokolova CiiT 2018

  26. Properties Ana Sokolova CiiT 2018

  27. Properties Local linearizability is compositional Ana Sokolova CiiT 2018

  28. Properties like linearizability Local linearizability is compositional unlike sequential consistency Ana Sokolova CiiT 2018

  29. Properties like linearizability Local linearizability is compositional unlike sequential consistency h (over multiple objects) is locally linearizable iff each per-object subhistory of h is locally linearizable Ana Sokolova CiiT 2018

  30. Properties like linearizability Local linearizability is compositional unlike sequential consistency h (over multiple objects) is locally linearizable iff each per-object subhistory of h is locally linearizable Local linearizability is modular / “decompositional” Ana Sokolova CiiT 2018

  31. Properties like linearizability Local linearizability is compositional unlike sequential consistency h (over multiple objects) is locally linearizable iff each per-object subhistory of h is locally linearizable uses decomposition into smaller Local linearizability is modular / histories, by definition “decompositional” Ana Sokolova CiiT 2018

  32. Properties like linearizability Local linearizability is compositional unlike sequential consistency h (over multiple objects) is locally linearizable iff each per-object subhistory of h is locally linearizable uses decomposition into smaller Local linearizability is modular / histories, by definition “decompositional” may allow for modular verification Ana Sokolova CiiT 2018

  33. Verification (queue) Queue sequential specification (axiomatic) s is a legal queue sequence iff 1. s is a legal pool sequence, and 2. enq(x) < s enq(y) ⋀ deq(y) ∈ s ⇒ deq(x) ∈ s ⋀ deq(x) < s deq(y) Ana Sokolova CiiT 2018

  34. Verification (queue) Queue sequential specification (axiomatic) s is a legal queue sequence iff 1. s is a legal pool sequence, and 2. enq(x) < s enq(y) ⋀ deq(y) ∈ s ⇒ deq(x) ∈ s ⋀ deq(x) < s deq(y) Queue linearizability (axiomatic) Henzinger, Sezgin, Vafeiadis CONCUR13 h is queue linearizable iff 1. h is pool linearizable, and 2. enq(x) < h enq(y) ⋀ deq(y) ∈ h ⇒ deq(x) ∈ h ⋀ deq(y) ≮ h deq(x) Ana Sokolova CiiT 2018

  35. Verification (queue) Queue sequential specification (axiomatic) s is a legal queue sequence iff 1. s is a legal pool sequence, and 2. enq(x) < s enq(y) ⋀ deq(y) ∈ s ⇒ deq(x) ∈ s ⋀ deq(x) < s deq(y) Queue linearizability (axiomatic) Henzinger, Sezgin, Vafeiadis CONCUR13 h is queue linearizable iff 1. h is pool linearizable, and 2. enq(x) < h enq(y) ⋀ deq(y) ∈ h ⇒ deq(x) ∈ h ⋀ deq(y) ≮ h deq(x) precedence order Ana Sokolova CiiT 2018

  36. Verification (queue) Queue sequential specification (axiomatic) s is a legal queue sequence iff 1. s is a legal pool sequence, and 2. enq(x) < s enq(y) ⋀ deq(y) ∈ s ⇒ deq(x) ∈ s ⋀ deq(x) < s deq(y) Queue local linearizability (axiomatic) h is queue locally linearizable iff 1. h is pool locally linearizable, and 2. enq(x) < h i enq(y) ⋀ deq(y) ∈ h ⇒ deq(x) ∈ h ⋀ deq(y) ≮ h deq(x) Ana Sokolova CiiT 2018

  37. Verification (queue) Queue sequential specification (axiomatic) s is a legal queue sequence iff 1. s is a legal pool sequence, and 2. enq(x) < s enq(y) ⋀ deq(y) ∈ s ⇒ deq(x) ∈ s ⋀ deq(x) < s deq(y) Queue local linearizability (axiomatic) h is queue locally linearizable iff 1. h is pool locally linearizable, and 2. enq(x) < h i enq(y) ⋀ deq(y) ∈ h ⇒ deq(x) ∈ h ⋀ deq(y) ≮ h deq(x) thread-local precedence order Ana Sokolova CiiT 2018

  38. Generic Implementations Ana Sokolova CiiT 2018

  39. Generic Implementations Your favorite linearizable data structure implementation Ana Sokolova CiiT 2018

  40. Generic Implementations Your favorite linearizable data structure implementation Φ Ana Sokolova CiiT 2018

  41. Generic Implementations Your favorite linearizable data structure implementation Φ turns into a locally linearizable implementation by: Ana Sokolova CiiT 2018

  42. Generic Implementations Your favorite linearizable data structure implementation Φ turns into a locally linearizable implementation by: t 1 t 2 … t n Φ Φ Φ Ana Sokolova CiiT 2018

  43. Generic Implementations Your favorite linearizable data structure implementation Φ turns into a locally linearizable implementation by: t 1 t 2 … t n segment of possibly dynamic size (n) Φ Φ Φ Ana Sokolova CiiT 2018

  44. Generic Implementations Your favorite linearizable data structure implementation Φ turns into a locally linearizable implementation by: t 1 t 2 … t n segment of possibly dynamic size (n) Φ Φ Φ local inserts / global (randomly distributed) removes Ana Sokolova CiiT 2018

  45. Generic Implementations Your favorite linearizable data structure implementation Φ turns into a locally linearizable implementation by: t 1 t 2 … t n segment of possibly dynamic size (n) LLD Φ (locally Φ Φ Φ linearizable) local inserts / global (randomly distributed) removes Ana Sokolova CiiT 2018

  46. Generic Implementations Your favorite linearizable data structure implementation Φ turns into a locally linearizable implementation by: t 1 t 2 … t n segment of possibly dynamic size (n) LLD Φ (locally Φ Φ Φ linearizable) local inserts / global (randomly distributed) removes LL+D Φ (also pool Ana Sokolova CiiT 2018 linearizable)

  47. Performance 26 million operations per sec (more is better) 24 22 20 18 16 14 12 10 8 6 4 2 0 2 10 20 30 40 50 60 70 80 number of threads MS LL+D MS 1-RA DQ LCRQ LLD LCRQ k-FIFO LLD k-FIFO (a) Queues, LL queues, and “queue-like” pools Ana Sokolova CiiT 2018

  48. Performance 26 million operations per sec (more is better) 24 22 20 LL+D MS queue 18 performs 16 significantly better 14 than 12 MS queue 10 8 6 4 2 0 2 10 20 30 40 50 60 70 80 number of threads MS LL+D MS 1-RA DQ LCRQ LLD LCRQ k-FIFO LLD k-FIFO (a) Queues, LL queues, and “queue-like” pools Ana Sokolova CiiT 2018

  49. Performance 26 million operations per sec (more is better) 24 22 20 LLD Φ 18 performs 16 significantly better 14 12 than 10 Φ 8 6 4 2 0 2 10 20 30 40 50 60 70 80 number of threads MS LL+D MS 1-RA DQ LCRQ LLD LCRQ k-FIFO LLD k-FIFO (a) Queues, LL queues, and “queue-like” pools Ana Sokolova CiiT 2018

  50. Performance 26 million operations per sec (more is better) 24 22 20 LL+D MS 18 queue 16 14 performs better 12 than 10 the best known 8 pools 6 4 2 0 2 10 20 30 40 50 60 70 80 number of threads MS LL+D MS 1-RA DQ LCRQ LLD LCRQ k-FIFO LLD k-FIFO (a) Queues, LL queues, and “queue-like” pools Ana Sokolova CiiT 2018

  51. Thank You! Local Linearizability Ana Sokolova joint work with: Andreas Haas Tom Henzinger Andreas Holzer Christoph Kirsch Michael Lippautz Hannes Payer Ali Sezgin Helmut Veith

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