Skip to main content

Mixing Hardware and Software Reversibility for Speculative Parallel Discrete Event Simulation

  • Conference paper
  • First Online:
Reversible Computation (RC 2016)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9720))

Included in the following conference series:

Abstract

Speculative parallel discrete event simulation requires a support for reversing processed events, also called state recovery, when causal inconsistencies are revealed. In this article we present an approach where state recovery relies on a mix of hardware- and software-based techniques. We exploit the Hardware Transactional Memory (HTM) support, as offered by Intel Haswell CPUs, to process events as in-memory transactions, which are possibly committed only after their causal consistency is verified. At the same time, we exploit an innovative software-based reversibility technique, fully relying on transparent software instrumentation targeting x86/ELF objects, which enables undoing side effects by events with no actual backward re-computation. Each thread within our speculative processing engine dynamically (on a per-event basis) selects which recovery mode to rely on (hardware vs software) depending on varying runtime dynamics. The latter are captured by a lightweight analytic model indicating to what extent the HTM support (not paying any instrumentation cost) is efficient, and after what level of events’ parallelism it starts degrading its performance, e.g., due to excessive data conflicts while manipulating causality meta-data within HTM-based transactions. We released our implementation as open source software and provide experimental results for an assessment of its effectiveness.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/HPDCS/htmPDES/tree/reverse.

  2. 2.

    Simultaneous events do not violate this assumption. Nevertheless, if not properly handled by some tie-breaking function [11, 13], they could give rise to livelocks in the speculative execution.

  3. 3.

    Other kind of delays, such as operating system sleeps, are unfeasible since any user/kernel transition will lead an HTM-based transaction to abort deterministically on current HTM-equipped processors.

  4. 4.

    The undo code blocks guarantee reversibility of memory updates limited to events executing the updates on the LP state in isolation, which complies with classical PDES where each LP is an intrinsically sequential entity.

  5. 5.

    For non-stationary models, where the distribution of the timestamp increment between successive events can change over time in non-negligible way, this same statistic could be simply rejuvenated periodically, by discarding non-recent events commitments and subtracting from \(commit\_horizon\) the upper limit of the discarded simulation time portion.

  6. 6.

    The hyper-threading support offered by the processors has been excluded just to avoid cross-thread interferences—due to conflicting hyper-threads’ accesses to hardware resources—which might alter the reliability of our analysis.

References

  1. Brown, R.: Calendar queues: a fast O(1) priority queue implementation for the simulation event set problem. Commun. ACM 31(10), 1220–1227 (1988)

    Article  Google Scholar 

  2. Carothers, C.D., Perumalla, K.S., Fujimoto, R.M.: Efficient optimistic parallel simulations using reverse computation. ACM Trans. Model. Comput. Simul. 9(3), 224–253 (1999)

    Article  Google Scholar 

  3. Cingolani, D., Pellegrini, A., Quaglia, F.: Transparently mixing undo logs and software reversibility for state recovery in optimistic PDES. In: Proceedings of the ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, pp. 211–222 (2015)

    Google Scholar 

  4. Dice, D., Shavit, N.: TLRW: return of the read-write lock. In: Proceedings of the 22nd Annual ACM Symposium on Parallel Algorithms and Architectures, pp. 284–293 (2010)

    Google Scholar 

  5. Ferscha, A.: Probabilistic adaptive direct optimism control in time warp. In: Proceedings of the 9th Workshop on Parallel and Distributed Simulation, pp. 120–129 (1995)

    Google Scholar 

  6. Ferscha, A., Luthi, J.: Estimating rollback overhead for optimism control in time warp. In: Proceedings of the 28th Annual Simulation Symposium, pp. 2–12 (1995)

    Google Scholar 

  7. Fujimoto, R.M.: Parallel discrete event simulation. Commun. ACM 33, 19–28 (1989)

    Google Scholar 

  8. Fujimoto, R.M.: Performance of time warp under synthetic workloads. In: Proceedings of the Multiconference on Distributed Simulation, pp. 23–28 (1990)

    Google Scholar 

  9. Fujimoto, R.M., Tsai, J.J., Gopalakrishnan, G.: Design and evaluation of the rollback chip: special purpose hardware for time warp. IEEE Trans. Comput. 41(1), 68–82 (1992)

    Article  Google Scholar 

  10. Jefferson, D.R.: Virtual time. ACM Trans. Program. Lang. Syst. 7(3), 404–425 (1985)

    Article  MathSciNet  Google Scholar 

  11. Jha, V., Bagrodia, R.: Simultaneous events and lookahead in simulation protocols. ACM Trans. Model. Comput. Simul. 10(3), 241–267 (2000)

    Article  Google Scholar 

  12. LaPre, J.M., Gonsiorowski, E.J., Carothers, C.D.: LORAIN: a step closer to the PDES ’Holy Grail’. In: Proceedings of the ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, pp. 3–14 (2014)

    Google Scholar 

  13. Mehl, H.: A deterministic tie-breaking scheme for sequential and distributed simulation. In: Proceedings of the Workshop on Parallel and Distributed Simulation (1992)

    Google Scholar 

  14. Pellegrini, A.: Hijacker: efficient static software instrumentation with applications in high performance computing. In: Proceedings of the International Conference on High Performance Computing and Simulation, pp. 650–655 (2013)

    Google Scholar 

  15. Pellegrini, A., Vitali, R., Quaglia, F., Pellegrini, A., Quaglia, F.: Autonomic state management for optimistic simulation platforms. IEEE Trans. Parallel Distrib. Syst. 26(6), 1560–1569 (2015)

    Article  Google Scholar 

  16. Preiss, B.R., Loucks, W.M., MacIntyre, D.: Effects of the checkpoint interval on time and space in time warp. ACM Trans. Model. Comput. Simul. 4(3), 223–253 (1994)

    Article  MATH  Google Scholar 

  17. Quaglia, F., Baldoni, R.: Exploiting intra-object dependencies in parallel simulation. Inf. Process. Lett. 70(3), 119–125 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  18. Quaglia, F., Santoro, A.: Non-blocking checkpointing for optimistic parallel simulation: description and an implementation. IEEE Trans. Parallel Distrib. Syst. 14(6), 593–610 (2003)

    Article  Google Scholar 

  19. Santini, E., Ianni, M., Pellegrini, A., Quaglia, F.: HTM based speculative parallel discrete event simulation of very fine grain models. In: Proceedings of the 22nd International Conference on High Performance Computing, pp. 145–154 (2015)

    Google Scholar 

  20. Soliman, H.M., Elmaghraby, A.S.: An analytical model for hybrid checkpointing in time warp distributed simulation. IEEE Trans. Parallel Distrib. Syst. 9(10), 947–951 (1998)

    Article  Google Scholar 

  21. West, D., Panesar, K.: Automatic incremental state saving. In: Proceedings of the 10th Workshop on Parallel and Distributed Simulation, pp. 78–85 (1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Davide Cingolani .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Cingolani, D., Ianni, M., Pellegrini, A., Quaglia, F. (2016). Mixing Hardware and Software Reversibility for Speculative Parallel Discrete Event Simulation. In: Devitt, S., Lanese, I. (eds) Reversible Computation. RC 2016. Lecture Notes in Computer Science(), vol 9720. Springer, Cham. https://doi.org/10.1007/978-3-319-40578-0_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-40578-0_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-40577-3

  • Online ISBN: 978-3-319-40578-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics