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
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
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
Local Linearizability (queue) example t1: enq(1) deq(2) t2: enq(2) deq(1) Ana Sokolova CiiT 2018
Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) Ana Sokolova CiiT 2018
Local Linearizability (queue) example (sequential) history not linearizable t1: enq(1) deq(2) t2: enq(2) deq(1) Ana Sokolova CiiT 2018
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
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
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
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
Local Linearizability (queue) definition Ana Sokolova CiiT 2018
Local Linearizability (queue) definition Queue signature ∑ = {enq(x) | x ∈ V} ∪ {deq(x) | x ∈ V} ∪ {deq(empty)} Ana Sokolova CiiT 2018
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
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
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
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
Generalizations of Local Linearizability Ana Sokolova CiiT 2018
Generalizations of Local Linearizability Signature ∑ Ana Sokolova CiiT 2018
Generalizations of Local Linearizability Signature ∑ For a history h with n threads, choose In h (i) Out h (i) Ana Sokolova CiiT 2018
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
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
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
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
Where do we stand? In general Linearizability Local Linearizability Sequential Consistency Ana Sokolova CiiT 2018
Where do we stand? For queues (and most container-type data structures) Linearizability Local Linearizability Sequential Consistency Ana Sokolova CiiT 2018
Properties Ana Sokolova CiiT 2018
Properties Local linearizability is compositional Ana Sokolova CiiT 2018
Properties like linearizability Local linearizability is compositional unlike sequential consistency Ana Sokolova CiiT 2018
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
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
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
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
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
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
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
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
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
Generic Implementations Ana Sokolova CiiT 2018
Generic Implementations Your favorite linearizable data structure implementation Ana Sokolova CiiT 2018
Generic Implementations Your favorite linearizable data structure implementation Φ Ana Sokolova CiiT 2018
Generic Implementations Your favorite linearizable data structure implementation Φ turns into a locally linearizable implementation by: Ana Sokolova CiiT 2018
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
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
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
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
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)
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
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
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
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
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
Recommend
More recommend