Model Execution 10-13
reverse event handler shown in Figure 10.17(c). This is obtained by inverting the order of the statements
in the forward event handler in Figure 10.17(b) and inverting the operations within each statement.
Event retraction within a processor is relatively easily achieved, simply removing the event from local
priority queue data structure of event list. Retracting events that have been forwarded to other processors
is slightly more involved, which requires forwarding a retraction request to the destination processor.
Two cases arise: the retraction request arrives the destination processor after the original event already
has arrived at that processor; the retraction request arrives at the destination processor even before the
original event arrived at that processor. The first case is easy to handle, since the original event is already
identifiable—the event is removed from the event list if it has not been processed, or it is first rolled back
and then removed if it has been already processed. If the retraction arrives before the event arrives, the
retraction is simply buffered and until the actual event is received and then both the retraction and the
event are nullified.
10.3.3.3 Mixed-Mode Parallel Execution
In mixed-mode parallel execution, the system supports a mixture of optimistic and conservative execution
within each processor. Entities can specify whether their events are to be processed using optimistic
(rollback-based) synchronization or conservative (blocking-based) synchronization. As a result, the
simulation algorithm becomes considerably more complex and hence not discussed here.
10.4 Summary
Model execution involves computing the evolution of state values for a set of interacting entities in
a model over time. Computing the state evolution can be performed using different time advancing
techniques, and executed sequentially or in parallel. Popular techniques include time-stepped execution
and discrete-event execution. While sequential execution of time-stepped techniques can be parallelized
in a relatively straightforward manner, parallelization of discrete-event execution involves resolution of
important synchronization issues. Parallel discrete-event synchronization approaches broadly fall under
two categories: conservative and optimistic methods. This chapter described the time-stepped and discrete-
event methods with examples and presented algorithms for their implementation for sequential and
parallel execution.
References
Bagrodia, R., R. Meyer, M. Takai, Y. Chen, X. Zeng, J. Martin, B. Park, and H. Song. “Parsec: A Parallel
Simulation Environment for Complex Systems.” IEEE Computer, 31(10) (1998): 77–85.
Balci, O. “The Implementation of Four Conceptual Frameworks for Simulation Modeling in High-Level
Languages.” Paper presented at the Winter Simulation Conference, 1988.
Banks, J., J. S. Carson II, and B. L. Nelson. Discrete-Event System Simulation. Upper Saddle River, NJ:
Prentice-Hall, 1996.
Carothers, C., K. S. Perumalla, and R. M. Fujimoto. “Efficient Optimistic Parallel Simulations Using
Reverse Computation.” ACM Transactions on Modeling and Computer Simulation, 9(3) (1999):
224–253.
Chandy, K. M. and R. Sherman. “Space, Time, and Simulation.” In Proceedings of the SCS Multiconference
on Distributed Simulation, pp. 53–57, SCS Simulation Series, 1989.
Das, S., R. M. Fujimoto, K. Panesar, D. Allison, and M. Hybinette. “GTW: A Time Warp System for Shared
Memory Multiprocessors.” In Proceedings of the 1994 Winter Simulation Conference, pp. 1332–1339,
1994.
Deelman, E., R. Bagrodia, R. Sakellariou, and V. Adve. “Improving Lookahead in Parallel Discrete
Event Simulations of Large-Scale Applications Using Compiler Analysis.” In Proceedings of the
15th Workshop on Parallel and Distributed Simulation, pp. 5–13, 2001.