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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 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.
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.
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.
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
Brown, R.: Calendar queues: a fast O(1) priority queue implementation for the simulation event set problem. Commun. ACM 31(10), 1220–1227 (1988)
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)
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)
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)
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)
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)
Fujimoto, R.M.: Parallel discrete event simulation. Commun. ACM 33, 19–28 (1989)
Fujimoto, R.M.: Performance of time warp under synthetic workloads. In: Proceedings of the Multiconference on Distributed Simulation, pp. 23–28 (1990)
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)
Jefferson, D.R.: Virtual time. ACM Trans. Program. Lang. Syst. 7(3), 404–425 (1985)
Jha, V., Bagrodia, R.: Simultaneous events and lookahead in simulation protocols. ACM Trans. Model. Comput. Simul. 10(3), 241–267 (2000)
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)
Mehl, H.: A deterministic tie-breaking scheme for sequential and distributed simulation. In: Proceedings of the Workshop on Parallel and Distributed Simulation (1992)
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)
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)
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)
Quaglia, F., Baldoni, R.: Exploiting intra-object dependencies in parallel simulation. Inf. Process. Lett. 70(3), 119–125 (1999)
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)
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)
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)
West, D., Panesar, K.: Automatic incremental state saving. In: Proceedings of the 10th Workshop on Parallel and Distributed Simulation, pp. 78–85 (1996)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)