enhancing permissiveness of transactional memory via time
play

Enhancing Permissiveness of Transactional Memory via Time-Warp Nuno - PowerPoint PPT Presentation

Enhancing Permissiveness of Transactional Memory via Time-Warp Nuno Diegues and Paolo Romano ndiegues@gsd.inesc-id.pt INESC-ID/Instituto Superior T ecnico Nuno Diegues 1/17 Introduction Transactional Memory Simple API + guarantee of


  1. Enhancing Permissiveness of Transactional Memory via Time-Warp Nuno Diegues and Paolo Romano ndiegues@gsd.inesc-id.pt INESC-ID/Instituto Superior T´ ecnico Nuno Diegues 1/17

  2. Introduction Transactional Memory Simple API + guarantee of correctness criterion Easy to use and reason Nuno Diegues 2/17

  3. A B Introduction To guarantee a given correctness level, a TM aborts transactions. Nuno Diegues 3/17

  4. Introduction To guarantee a given correctness level, a TM aborts transactions. A r(z) B Nuno Diegues 3/17

  5. Introduction To guarantee a given correctness level, a TM aborts transactions. w(z) A r(z) B Nuno Diegues 3/17

  6. Introduction To guarantee a given correctness level, a TM aborts transactions. w(z) A r(z) B Nuno Diegues 3/17

  7. Introduction To guarantee a given correctness level, a TM aborts transactions. w(z) A r(z) B Nuno Diegues 3/17

  8. Introduction To guarantee a given correctness level, a TM aborts transactions. w(z) A r(z) B Nuno Diegues 3/17

  9. Introduction To guarantee a given correctness level, a TM aborts transactions. w(z) A r(z) B Nuno Diegues 3/17

  10. Introduction To guarantee a given correctness level, a TM aborts transactions. w(z) A r(z) B X Nuno Diegues 3/17

  11. w(z) A r(z) B X Problem at hands But why are we aborting the transaction in the example? Nuno Diegues 4/17

  12. Problem at hands But why are we aborting the transaction in the example? Instead, we could do the following: w(z) A r(z) B Serialization order: B , A Nuno Diegues 4/17

  13. Problem at hands Condition: Abort T if its reads are not up-to-date when it attempts to commit. Nuno Diegues 5/17

  14. Problem at hands Condition: Abort T if its reads are not up-to-date when it attempts to commit. Serializability: Necessary condition But not sufficient Nuno Diegues 5/17

  15. Problem at hands Condition: Abort T if its reads are not up-to-date when it attempts to commit. Serializability: Necessary condition But not sufficient Deemed to be practical Nuno Diegues 5/17

  16. Permissiveness Notion of avoiding unnecessary aborts Nuno Diegues 6/17

  17. Permissiveness Notion of avoiding unnecessary aborts: If it only aborts a transaction when the resulting history (without the abort) does not respect some target correctness criterion Nuno Diegues 6/17

  18. Permissiveness State of the art TMs far from being permissive. Nuno Diegues 7/17

  19. Permissiveness State of the art TMs far from being permissive. Cost is not negligible. Nuno Diegues 7/17

  20. Permissiveness State of the art TMs far from being permissive. Cost is not negligible. What do we have to counter that? One way is to track the graph of dependencies — DATM ◮ inconsistent reads and zombie transactions Nuno Diegues 7/17

  21. Permissiveness State of the art TMs far from being permissive. Cost is not negligible. What do we have to counter that? One way is to track the graph of dependencies — DATM ◮ inconsistent reads and zombie transactions Maintain interval of possible serialization points — AVSTM ◮ Moderate bookkeeping ◮ Aborts read-only transactions Nuno Diegues 7/17

  22. Goal Enhance permissiveness without such costs Nuno Diegues 8/17

  23. Goal Enhance permissiveness without such costs: More restrictive abort condition Always read consistently Wait-free read-only transactions (mv-permissiveness) Nuno Diegues 8/17

  24. Time-warping Allow transactions to commit in the past Nuno Diegues 9/17

  25. Time-warping Allow transactions to commit in the past: Pick the condition defined previously ◮ Abort T if its reads are not up-to-date when it attempts to commit. Nuno Diegues 9/17

  26. Time-warping Allow transactions to commit in the past: Pick the condition defined previously ◮ Abort T if its reads are not up-to-date when it attempts to commit. Commit T and serialize it before the writes it missed ◮ Time-warp commit Nuno Diegues 9/17

  27. Time-warp w(z) A 1 Natural Commit: 1 w(x) r(z) B Natural Commit: 2 Same history as before Nuno Diegues 10/17

  28. Time-warp w(z) A 1 Time-warp: 1 Natural Commit: 1 w(x) r(z) B Natural Commit: 2 Time-warp order Nuno Diegues 10/17

  29. Time-warp w(z) A 1 Time-warp: 1 Natural Commit: 1 w(x) r(z) B Time-warp: 1 - Ɛ Natural Commit: 2 B time-warp commits Nuno Diegues 10/17

  30. Time-warp When can we not apply this idea? Nuno Diegues 11/17

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

  32. Time-warp When can we not apply this idea? Look out for a specific structure: Three transactions connected — a triad Nuno Diegues 11/17

  33. Time-warp When can we not apply this idea? Look out for a specific structure: Three transactions connected — a triad The link between all three — the pivot Nuno Diegues 11/17

  34. Time-warp When can we not apply this idea? Look out for a specific structure: Three transactions connected — a triad The link between all three — the pivot Abort T if Nuno Diegues 11/17

  35. Time-warp When can we not apply this idea? Look out for a specific structure: Three transactions connected — a triad The link between all three — the pivot Abort T if: ◮ Completes a triad Nuno Diegues 11/17

  36. Time-warp When can we not apply this idea? Look out for a specific structure: Three transactions connected — a triad The link between all three — the pivot Abort T if: ◮ Completes a triad ◮ Whose pivot time-warp committed Nuno Diegues 11/17

  37. Abort rule r(x) w(y) A C r(y) w(x) B C aborts here Nuno Diegues 12/17

  38. Abort rule r(y) r(x) A w(y) C r(y) w(x) B (rather strict) necessary condition for a cycle Nuno Diegues 12/17

  39. Theoretical and Practical results Serializability for committed transactions Nuno Diegues 13/17

  40. Theoretical and Practical results Serializability for committed transactions Virtual World Consistency (stronger) for running transactions ◮ Prevent a range of phenomena to avoid sandboxing Nuno Diegues 13/17

  41. Theoretical and Practical results Serializability for committed transactions Virtual World Consistency (stronger) for running transactions ◮ Prevent a range of phenomena to avoid sandboxing Lock-free prototype in Java Nuno Diegues 13/17

  42. Theoretical and Practical results Serializability for committed transactions Virtual World Consistency (stronger) for running transactions ◮ Prevent a range of phenomena to avoid sandboxing Lock-free prototype in Java 48 core machine Nuno Diegues 13/17

  43. Theoretical and Practical results Serializability for committed transactions Virtual World Consistency (stronger) for running transactions ◮ Prevent a range of phenomena to avoid sandboxing Lock-free prototype in Java 48 core machine Nuno Diegues 13/17

  44. SkipList and Vacation from STAMP 5M JVSTM 4M TL2 throughput (txs/s) TWM 3M 2M 1M 1 5 10 15 20 25 30 35 40 45 20k 15k 10k 5k Nuno Diegues 1 5 10 15 20 25 30 35 40 45 14/17

  45. SkipList and Vacation from STAMP 50 40 aborted txs (%) 5M JVSTM 4M TL2 30 throughput (txs/s) TWM 3M 20 2M 10 1M 0 1 5 10 15 20 25 30 35 40 45 1 5 10 15 20 25 30 35 40 45 100 80 60 20k 15k 40 10k 20 5k 0 1 5 10 15 20 25 30 35 40 45 1 5 10 15 20 25 30 35 40 45 Nuno Diegues 14/17

  46. Ongoing work 1/2 Nuno Diegues 15/17

  47. Ongoing work 1/2 Time-warp in a distributed transactional setting Nuno Diegues 15/17

  48. Ongoing work 1/2 Time-warp in a distributed transactional setting: Generalizable to a variety of protocols Nuno Diegues 15/17

  49. Ongoing work 1/2 Time-warp in a distributed transactional setting: Generalizable to a variety of protocols Partially replicated key-value store with transactions Nuno Diegues 15/17

  50. Ongoing work 1/2 Time-warp in a distributed transactional setting: Generalizable to a variety of protocols Partially replicated key-value store with transactions Scalable solution ◮ Now also with update workloads Nuno Diegues 15/17

  51. Ongoing work 2/2 Partially replicated large collections Scalable computations Transaction friendly despite structural conflicts Nuno Diegues 16/17

  52. Thank you Nuno Diegues 17/17

Recommend


More recommend