10-10 Handbook of Dynamic System Modeling
Parallel/
distributed
execution
Conservative Optimistic Mixed mode
Asynchronous Synchronous State-saving
Reverse
computation
Unified
framework
FIGURE 10.14 Classification of common parallel/distributed execution techniques.
10.3.3.1 Conservative Parallel Execution
A fundamental problem with conservative parallel simulation is concerned with the concept of lookahead.
In the absence of the concept of lookahead, suppose any simulator that is processing an event with
timestamp T can generate another event, whose timestamp is also equal to T, to another simulator.
Moreover, this new event could be destined to any or all simulators. In such a scenario, to ensure timestamp-
ordered processing, it is clear that there is little concurrency among federates. Only the event with the
globally minimum timestamp in the entire system can be processed at its simulator, while all the rest of
the simulators necessarily have to stay idle. Essentially, this degenerates to sequential execution, albeit with
multiple simulators. Clearly, this is undesirable in interest of runtime performance. It becomes desirable
to uncover concurrency among simulators to avoid such serialization. The concept of lookahead is defined
to resolve this problem (Deelman, 01).
Lookahead is defined as the minimum increment in simulation time between an event and any new
events generated during processing of that event. When this lookahead is greater than zero at all simulators,
the parallel execution can experience concurrency. If the lookahead is zero for any federate (i.e., a simulator
can generate events with zero delay), then the entire simulation suffers from serial execution (discounting
unrelated events with equal timestamps at different simulators).
In simulation models, it is possible to extractlookahead by examining the minimum time for interactions
to occur among entities. For example, signal transmission delays could be used to compute minimum
propagation delays across the ATM source and multiplexer entities. In other models, it might be difficult
to extract nonzero lookahead. Lookahead extraction is a topic of much research, and unfortunately remains
a challenge in its generality.
A typical conservative parallel simulation algorithm is shown in Figure 10.15. A quantity called lbts,
short for lower bound on incoming timestamps, is used to keep track of the smallest timestamp on
events that can potentially arrive from other processors. If lbts equals infinity, it is clear that this loop
simply degenerates to the sequential simulation loop in Figure 10.15. The complexity of the conservative
algorithm is in the computation of lbts, in step 4.3.1. Assuming there are no events in transit in the
interprocessor messaging network, it is easy to compute lbts, which is simply the minimum among all
values passed to the compute-lbts() function by all processors. Once this value is computed, it should be
corrected to take into account the events in transit, if any, among processors. This final value can now be
used as the lower bound guarantee on incoming event timestamps, and the rest of the loop is a simple
variant of the sequential loop.
An example scenario of conservative execution is shown in Figure 10.16. Let us assume each entity is
mapped to a different processor, and consider the operation of the processor simulating the multiplexer
entity. Suppose the multiplexer has just processed its events until time 8 (i.e., t
now
=8). It now finds two
events D@9 and A@10 in its event list. To determine if D@9 can be processed, it needs to compute the
value of lbts and wait until lbts is at least 9. Assume that the modeler has specified a transmission