input acceptance of time warping transactional memory
play

Input Acceptance of Time-Warping Transactional Memory Nuno Diegues - PowerPoint PPT Presentation

Input Acceptance of Time-Warping Transactional Memory Nuno Diegues and Paolo Romano ndiegues@gsd.inesc-id.pt Nuno Diegues 1/20 Context Time-warp [DISC13] minimize spurious abort Nuno Diegues 2/20 Context Time-warp [DISC13]


  1. Input Acceptance of Time-Warping Transactional Memory Nuno Diegues and Paolo Romano ndiegues@gsd.inesc-id.pt Nuno Diegues 1/20

  2. Context Time-warp [DISC13] — minimize spurious abort Nuno Diegues 2/20

  3. Context Time-warp [DISC13] — minimize spurious abort Input Acceptance [OPODIS08] — measure Nuno Diegues 2/20

  4. Context Time-warp [DISC13] — minimize spurious abort Input Acceptance [OPODIS08] — measure Analysis results from the paper Nuno Diegues 2/20

  5. Spurious Aborts in TM To guarantee a given correctness level, a TM aborts transactions. Nuno Diegues 3/20

  6. Spurious Aborts in TM Permissiveness: If it only aborts a transaction when the resulting history (without the abort) does not respect some target correctness criterion Nuno Diegues 4/20

  7. Spurious Aborts in TM Permissiveness: If it only aborts a transaction when the resulting history (without the abort) does not respect some target correctness criterion Impractical to achieve [DISC08] [SPAA09] Serializability Graph Testing — Bernstein’87 Nuno Diegues 4/20

  8. Spurious Aborts in TM Most TM algorithms: function commit ( Transaction tx ): for each ‹ datum , version › ∈ tx .readSet do if not latestVersion( datum , version ) then abort( tx ) Nuno Diegues 5/20

  9. Problem Nuno Diegues 6/20

  10. Problem read x read y write y T 1 rw T 2 read x write x Nuno Diegues 6/20

  11. Problem read x read y write y T 1 rw T 2 read x write x T 2 T 1 serialization time Nuno Diegues 6/20

  12. Problem read x read y write y T 1 rw T 2 read x write x rw T 2 T 1 serialization time Nuno Diegues 6/20

  13. Problem read x read y write y T 1 rw T 2 read x write x T 2 serialization Nuno Diegues 6/20

  14. Problem read x read y write y T 1 rw T 2 read x write x rw T 1 T 2 serialization Nuno Diegues 6/20

  15. Problem read x read y write y T 1 rw T 2 read x write x rw T 1 T 2 serialization Time-warp commit Nuno Diegues 6/20

  16. Time-warp When can we not apply this idea? Nuno Diegues 7/20

  17. Time-warp When can we not apply this idea? Look out for a specific structure Nuno Diegues 7/20

  18. Time-warp When can we not apply this idea? Look out for a specific structure: write y read x Three transactions connected A B ◮ a triad rw rw T read y write x Nuno Diegues 7/20

  19. Time-warp When can we not apply this idea? Look out for a specific structure: write y read x Three transactions connected A B ◮ a triad The link between all three rw rw ◮ the pivot Pivot T read y write x Nuno Diegues 7/20

  20. Time-warp When can we not apply this idea? Look out for a specific structure: Three transactions connected write y read x A B ◮ a triad The link between all three rw rw ◮ the pivot Pivot T Abort if: read y write x ◮ Completes a triad ◮ Whose pivot time-warp commits Nuno Diegues 7/20

  21. Alternative approaches to Time-Warping Interval-Based : AVSTM [DISC08], TSTM [TRANSACT08], IR_VWC_P [ICA3PP11] Nuno Diegues 8/20

  22. Alternative approaches to Time-Warping Interval-Based : AVSTM [DISC08], TSTM [TRANSACT08], IR_VWC_P [ICA3PP11] bounds for serialization order refined with transaction execution imposed by concurrent commits choose one value in the final interval Nuno Diegues 8/20

  23. Comparison on reduction of spurious aborts Plethora of algorithms: all those mentioned above visible reads deferred updates single-version vs multi-version Nuno Diegues 9/20

  24. Input Acceptance Sequences of input events to TM: P = b 1 b 2 r x 1 w x 2 c 2 Nuno Diegues 10/20

  25. Input Acceptance Sequences of input events to TM: P = b 1 b 2 r x 1 w x 2 c 2 Input P is rejected if TM aborts one (or more) transactions Nuno Diegues 10/20

  26. Input Acceptance Sequences of input events to TM: P = b 1 b 2 r x 1 w x 2 c 2 Input P is rejected if TM aborts one (or more) transactions Input class is a set of input patterns: C = π ∗ ( r x i w x i ¬ c ∗ j ) ε ¬ c ∗ i c j π ∗ Nuno Diegues 10/20

  27. Input Acceptance Sequences of input events to TM: P = b 1 b 2 r x 1 w x 2 c 2 Input P is rejected if TM aborts one (or more) transactions Input class is a set of input patterns: C = π ∗ ( r x i w x i ¬ c ∗ j ) ε ¬ c ∗ i c j π ∗ Input class is rejected if all input patterns are rejected Nuno Diegues 10/20

  28. So far... Serializability Graph Visible Writes Visible Visible Writes Invisible Invisible Writes Reads (VWVR) Reads (VWIR) Testing (SGT) Invisible Reads (IWIR) DSTM WSTM SXM TinySTM TL2 2PL SSTM SwissTM JVSTM Nuno Diegues 11/20

  29. Updated hierarchy Serializability Graph Visible Writes Visible Visible Writes Invisible Invisible Writes MV-IWIR Reads (VWVR) Reads (VWIR) Testing (SGT) Invisible Reads (IWIR) JVSTM TWM SMV DSTM WSTM SXM AbortsAvoider TinySTM TL2 2PL SSTM SwissTM IR_VWC_P AVSTM TSTM Interval based (IB) Nuno Diegues 12/20

  30. MV-Permissiveness Serializability Graph Visible Writes Visible Visible Writes Invisible Invisible Writes MV-IWIR Testing (SGT) Reads (VWVR) Reads (VWIR) Invisible Reads (IWIR) JVSTM TWM SMV DSTM WSTM SXM AbortsAvoider TinySTM TL2 SSTM 2PL SwissTM IR_VWC_P AVSTM TSTM Interval based (IB) Abort-free read-only transactions Nuno Diegues 13/20

  31. Interval-Based Serializability Graph Visible Writes Visible Visible Writes Invisible Invisible Writes MV-IWIR Testing (SGT) Reads (VWVR) Reads (VWIR) Invisible Reads (IWIR) JVSTM TWM SMV DSTM WSTM SXM AbortsAvoider TinySTM TL2 SSTM 2PL SwissTM IR_VWC_P AVSTM TSTM Interval based (IB) May also abort with one "miss", but with more constraints Nuno Diegues 14/20

  32. Permissive solutions Serializability Graph Visible Writes Visible Visible Writes Invisible Invisible Writes MV-IWIR Testing (SGT) Reads (VWVR) Reads (VWIR) Invisible Reads (IWIR) JVSTM TWM SMV DSTM WSTM SXM AbortsAvoider TinySTM TL2 2PL SSTM SwissTM IR_VWC_P AVSTM TSTM Interval based (IB) Can abort a transaction in serializable histories Nuno Diegues 15/20

  33. Time-Warping Serializability Graph Visible Writes Visible Visible Writes Invisible Invisible Writes MV-IWIR Testing (SGT) Reads (VWVR) Reads (VWIR) Invisible Reads (IWIR) JVSTM TWM SMV DSTM WSTM SXM AbortsAvoider TinySTM TL2 SSTM 2PL SwissTM IR_VWC_P AVSTM TSTM Interval based (IB) Time-warping is also MV-Permissive and does not abort with one "miss" Nuno Diegues 16/20

  34. Time-Warping vs Interval-Based Serializability Graph Visible Writes Visible Visible Writes Invisible Invisible Writes MV-IWIR Testing (SGT) Reads (VWVR) Reads (VWIR) Invisible Reads (IWIR) JVSTM TWM SMV DSTM WSTM SXM AbortsAvoider TinySTM TL2 SSTM 2PL SwissTM IR_VWC_P AVSTM TSTM Interval based (IB) Tricker case, detailed in the paper Nuno Diegues 17/20

  35. Summary Reduction of spurious aborts Time-Warping Input Acceptance Nuno Diegues 18/20

  36. References SXM: R. Guerraoui, M. Herlihy and B. Pochon. Polymorphic contention management. DISC ’05. DSTM: M. Herlihy, V. Luchangco, M. Moir and W. Scherer. Software transactional memory for dynamic-sized data structures. PODC ’03. TinySTM: P. Felber, C. Fetzer and T. Riegel. Dynamic performance tuning of word-based software transactional memory. PPoPP ’08. SwissTM: A. Dragojević, R. Guerraoui M. Kapalka. Stretching transactional memory. PLDI ’09. WSTM: K. Fraser and T. Harris. Concurrent programming without locks. TOCS ’07. TL2: D. Dice, O. Shalev and N. Shavit. Transactional locking II. DISC ’06. JVSTM: S. Fernandes and J. Cachopo. Lock-free and scalable multi-version software transactional memory. PPoPP ’11. SMV: D. Perelman, A. Byshevsky, O. Litmanovich, and I. Keidar. SMV: selective multi-versioning STM. DISC ’11. IR_VWC_P: T. Crain,D. Imbs and M. Raynal. Read invisibility, virtual world consistency and probabilistic permissiveness are compatible. ICA3PP ’12. AVSTM: R. Guerraoui, T. Henzinger and V. Singh. Permissiveness in Transactional Memories. DISC ’08. TSTM: U. Aydonat and T. Abdelrahman. Relaxed Concurrency Control in Software Transactional Memory. TPDS ’12. TWM: N. Diegues and P. Romano. Enhancing Permissiveness in Transactional Memory via Time-Warping. TR INESC-ID. AbortsAvoider: Keidar, Idit and Perelman, Dmitri. On avoiding spare aborts in transactional memory. SPAA ’09. SSTM: V. Gramoli, D. Harmanci, P. Felber. Toward a Theory of Input Acceptance for Transactional Memories. OPODIS ’08. Nuno Diegues 19/20

  37. Questions? Thank you Nuno Diegues 20/20

Recommend


More recommend