Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pot: Deterministic transactional execution

Tiago Vale
January 24, 2017

Pot: Deterministic transactional execution

Slides presented at HiPEAC 2017.

Reference: Tiago M. Vale, João A. Silva, Ricardo J. Dias, and João M. Lourenço. 2016. Pot: Deterministic Transactional Execution. ACM Trans. Archit. Code Optim. 13, 4.

Paper: https://arxiv.org/pdf/1612.07702

Tiago Vale

January 24, 2017
Tweet

More Decks by Tiago Vale

Other Decks in Research

Transcript

  1. Coordinate operations that access shared state using TM transaction {

    read this do something write that } Only specify what should be atomic, system ensures it!
  2. “Heisenbugs” ~70% of concurrency bugs!* *Learning from mistakes: a comprehensive

    study on real world concurrency bug characteristics, ASPLOS 2008
  3. reads writes reads writes x x y read(x) write(x) read(x)

    read(y) write(x) y x x x 1. Speculative phase
  4. read(x) reads write(x) writes read(x) read(y) write(x) x x =

    ? y x x x reads writes x x y 2. Commit phase
  5. read(x) reads write(x) writes read(x) read(y) write(x) y y =

    ? y x x x reads writes x x y 2. Commit phase
  6. read(x) reads write(x) writes read(x) read(y) write(x) x x =

    ? y x x x reads writes x x y 2. Commit phase
  7. Define a deterministic transaction order • Sequencer Guarantee execution respects

    predefined order • Ordered commits • Fast execution mode Key challenges
  8. Implementation Software TM: • Fast mode: No read set, validation,

    write set, write back Hardware TM (IBM POWER): • Ordered commits: Suspended transactional mode • Fast mode: Rollback-only transactions See for +details
  9. Software transactional memory (see paper for + detail) • Slowdown

    of deterministic execution? • Is the fast execution mode faster? • Do transactions wait less? Hardware transactional memory (see paper) Evaluation See for +details
  10. Normalized execution time 0 1 2 3 4 5 Number

    of threads 2 4 8 16 Deterministic execution (STAMP trend)
  11. Normalized execution time 0 1 2 3 4 5 Number

    of threads 2 4 8 16 Nondeterministic Deterministic execution (STAMP trend)
  12. Normalized execution time 0 1 2 3 4 5 Number

    of threads 2 4 8 16 Nondeterministic This work Deterministic execution (STAMP trend)
  13. Normalized execution time 0 1 2 3 4 5 Number

    of threads 2 4 8 16 Comparable to nondeterministic! Nondeterministic This work Deterministic execution (STAMP trend)
  14. Normalized execution time 0 1 2 3 4 5 Number

    of threads 2 4 8 16 < 2× slower than nondeterministic Nondeterministic This work Deterministic execution (STAMP trend)
  15. Normalized execution time 0 1 2 3 4 5 Number

    of threads 2 4 8 16 Nondeterministic This work State of the art (DeSTM) Deterministic execution (STAMP trend)
  16. Normalized execution time 0 1 2 3 4 5 Number

    of threads 2 4 8 16 Nondeterministic This work State of the art (DeSTM) ~3× better than state of the art! Deterministic execution (STAMP trend)
  17. Evaluation Software transactional memory (see paper for + detail) •

    Slowdown of deterministic execution? • Is the fast execution mode faster? • Do transactions wait less? Hardware transactional memory (see paper) See for +details
  18. Fast mode speedup × faster than standard execution 0 1

    2 3 4 5 6 Number of accesses 0 1 2 4 8 16 32 64
  19. × faster than standard execution 0 1 2 3 4

    5 6 Number of accesses 0 1 2 4 8 16 32 64 50% reads, 50% writes Fast mode speedup
  20. × faster than standard execution 0 1 2 3 4

    5 6 Number of accesses 0 1 2 4 8 16 32 64 Pays off after 2 accesses 50% reads, 50% writes Fast mode speedup
  21. Evaluation Software transactional memory (see paper for + detail) •

    Slowdown of deterministic execution? • Is the fast execution mode faster? • Do transactions wait less? Hardware transactional memory (see paper) See for +details
  22. This work Normalized time transactions waste waiting 0 1 2

    3 4 Number of threads 2 4 8 16 Waiting overhead (STAMP trend)
  23. Normalized time transactions waste waiting 0 1 2 3 4

    Number of threads 2 4 8 16 This work State of the art (DeSTM) Waiting overhead (STAMP trend)
  24. Determinism helps building reliable concurrent software Methodology applicable to both

    STM and HTM Fast mode: take advantage of deterministic order to minimise overheads <2× slower than nondeterministic
 ~3× better than state of the art Conclusion
  25. Determinism helps building reliable concurrent software Methodology applicable to both

    STM and HTM Fast mode: take advantage of deterministic order to minimise overheads <2× slower than nondeterministic
 ~3× better than state of the art Thank you for your attention! Conclusion
  26. Tiago Vale1 João Silva1 Ricardo Dias12 João Lourenço1 1NOVA LINCS

    / UNL 2SUSE Linux GmbH Deterministic transactional execution