170 likes | 274 Views
Inherent Limitations on Disjoint-Access Parallel Transactional Memory. Hagit Attiya, Eshcar Hillel, Alessia Milani Technion. Complexity Bounds for STMs: Why?. Indicate futile design choices Elucidate expectations (specification) Spell out assumptions (models of the architecture).
E N D
Inherent Limitations on Disjoint-Access Parallel Transactional Memory Hagit Attiya, Eshcar Hillel, Alessia MilaniTechnion Inherent limitations on DAP TMs
Complexity Bounds for STMs: Why? • Indicate futile design choices • Elucidate expectations (specification) • Spell out assumptions (models of the architecture) Inherent limitations on DAP TMs
DAP: Disjoint Access Parallelism T1 T3 T1 Read(Y) Write(X1) Write(X2) T2 T3 Read(X2) Read(X1) Improves scalability for large data structures by reducing interference Y X1 X2 Disjoint data sets no contention Data sets are connected may contend 3 3 Inherent limitations on DAP TMs
Optimizing for Read-Only Transactions Transactions that do not modify the data should Be invisible (not write to low-level objects) Avoid contention for the memory Always terminate successfully (wait-free) 4 4 Inherent limitations on DAP TMs
Some Known STMs… Coincidence or inherent tradeoff ? 5 5 Inherent limitations on DAP TMs
Inherent Tradeoff Theorem. There is no TM implementation that is DAP and has invisible & wait-free read-only transactions The paper also shows a lower bound: Theorem. A transaction with a data set of size t must write to t-1 base objects Both proofs utilize the flippable execution, used to prove lower bounds for atomic snapshot objects [Israeli & Shirazi] [Attiya, Ellen & Fatourou] 6 6 Inherent limitations on DAP TMs
Flippable Execution w/ 2 Updaters U0 … Ul-1 … Uk p1 Ek U1 …Ul … p2 s1 … sl-1sl … sk q A complete transaction in which p1 writes l-1 to X1 A read-only transaction by q that reads X1 , X2 Inherent limitations on DAP TMs
U0 … Ul-1 … Uk p1 U1 …Ul … p2 s1 … sl-1sl … sk q Flippable Execution w/ 2 Updaters Ek Indistinguishable from executions where the order of (each pair of) updates is flipped… In one of two ways (forward and backward). Inherent limitations on DAP TMs
U0 … Ul-1 … Uk p1 U1 …Ul … p2 s1 … sl-1sl … sk q Flippable Execution: Backward Flip Ek Backward Flip U0 … Ul-1 … Uk p1 U1 …Ul … p2 s1 … sl-1sl … sk q Inherent limitations on DAP TMs
Why Flippable Executions? Lemma 1. The read-only transaction of q cannot terminate successfully Relies on strict serializabitly (~linearizability) • The serialization of committed transactions must preserve the real-time order of non-overlapping transactions Inherent limitations on DAP TMs
U0 Ul-1 Uk U1 …Ul … Serialization of Ek U0 … Ul-1 … Uk p1 Ek U1 …Ul … p2 Returns (l-1,l-2) s1 … sl-1sl … sk q Serialization of Ek: Serialization point Inherent limitations on DAP TMs
U0 U0 Ul-1 Uk U1 …Ul Ul-1 … Uk U1 …Ul … Nowhere to Serialize U0 … Ul-1 … Uk p1 Indistinguishable from some flip (say, backward) Ek U1 …Ul … p2 Returns (l-1,l-2) s1 … sl-1sl … sk q Serialization U0 … Ul-1 … Uk p1 BW Flip Still returns (l-1,l-2) U1 …Ul … p2 s1 … sl-1sl … sk q Serialization Inherent limitations on DAP TMs
Completing the Proof Show that a flippable execution exists The read-only transaction is invisible its steps can be removed Transactions Ul & Ul-1have disjoint data sets Ul & Ul-1do not “communicate” (by DAP) Ul & Ul-1can be flipped By Lemma 1, the read-only transaction cannot terminate successfully If aborts, can apply the same argument again… 13 Inherent limitations on DAP TMs
Complexity Bounds for STMs: What are the implications? • Adapt your expectations • What STM guarantees (e.g. consistency) • What you measure: • Best case, average case • Special workloads Inherent limitations on DAP TMs
Weaker Liveness Condition If a transaction runs alone from a quiescent configuration then it terminates successfully Weakly progressive blocking implementation [Guerraoui & Kapalka] OUR RESULTS STILL HOLD Inherent limitations on DAP TMs
Serializability Snapshot Isolation Virtual world consistency Causal consistency Causal serializability Weaker Consistency Conditions OUR RESULTS STILL HOLD OPEN PROBLEM 16 Inherent limitations on DAP TMs
Thank you![paper in SPAA 09] Inherent limitations on DAP TMs