NASA Contractor Report 182034
ICASE Report No. 90-20
ICASE
THE COST OF CONSERVATIVE SYNCHRONIZATION IN
PARALLEL DISCRETE EVENT SIMULATIONS
David M. Nicol
Contract No. NAS1-18605
May 1990
Institute for Computer Applications in Science and Engineering
NASA Langley Research Center
Hampton, Virginia 23665-5225
Operated by the Universities Space Research Association
(NASA-CR-1820_4) THE C_ST OF CF)NSERVATIVE
SYNCHRONI!ATIqN IN PArALLeL DISCR_TF EVENT
SIMULATIONS Final Report (ICASF) 32 p
CSCL 09B
III/ A
National Aeronautics and
Space Adminislralion
Langley Research Center
Hamplon, Virginia 23665-5225
G3/ol
Ngo-z3912
The
Cost of Conservative Synchronization in
Parallel Discrete Event Simulations
David M. Nicol
Department of Computer Science *
College of William and Mary
May 7, 1990
Abstract
This paper analytically studies the performance of a synchronous conserwtive par-
allel discrete-event simulation protocol. The class of simulation models considered are
oriented around a physical domain, and possess a limited ability to predict future be-
havior. Using a stochastic model we show that as the volume of simulation activity
in the model increases relative to a fixed architecture, the complexity of the average
per-event overhead due to synchronization, event list manipulation, lookahead calcu-
lations, and processor idle time approaches the complexity of the average per-event
overhead of a serial simulation. The method is therefore within a constant factor of
optimal. Our analysis demonstrates that on large problems--those for which parallel
processing is ideally suited--there is often enough parallel workload so that processors
are not usually idle. We also demonstrate the viability of the method empirically,
showing how good performance is achieved on large problems using a thirty-two node
Intel iPSC/2 distributed memory multiprocessor.
*Supported in part by the Virginia Center for Innovative Technology, by NASA grants NAG-I-060 and
NAS1-18605, and NSF grant ASC 8819393
............. _7
1 Introduction
The problem of parallelizing discrete-event simulations has received a great deal of attention
in the last several years. Simulations pose unique synchronization constraints due to their
underlying sense of time. When the simulation model can be simultaneously changed by
different processors, actions by one processor can affect actions by another. One must not
simulate any element of the model too far ahead of any other in simulation time, to avoid the
risk of having its logical past affected. Alternately, one must be prepared to fix the logical
past of any element determined to have been simulated too far.
Two schools of thought have emerged concerning synchronization, The conservative
school [5], [13], [23], [24] employs methods which prevent any processor from simulating
beyond a point at which another processor might affect it. These synchronization points
need to be re-established periodically to allow the simulation to progress. Early efforts
focussed on finding protocols which were either free from deadlock, or which detected and
corrected deadlock [17]. The optimistic school [7] allows a processor to simulate as far forward
in time as it wants, without regard for the risk of having its simulation past affected. If its
past is changed (due to interaction with a processor farther behind in simulation time) it
must then be able to "rollback" in time at least that far, and must cancel any erroneous
actions it has taken in its false future.
Conservative protocols are sometimes faulted for leaving processors idle, due to overly
pessimistic synchronization assumptions. It is almost always true that individual model
elements are blocked because of pessimistic synchronization; the conclusion that processors
tend to be blocked requires the assumption that all model elements assigned to a processor
tend to be blocked simultaneously, or that each processor has only one model element. The
latter assumption pervades many performance studies, and is unrealistic for fined-grained
simulation models executed on coarser grained multiprocessors. Intuition suggests that if
there are many model elements assigned to each processor, then it is unlikely that all model
elements on a processor will be blocked. Given sufficient workload, a properly designed
conservative method should not leave processors idle, because there is so much work to do.
While some model elements are blocked due to synchronization concerns, other elements,
with high probability, are not.
It is natural to ask how much performance degradation due to blocking a conservative
method suffers. We answer that question, by analyzing a simple conservative synchronization
method. The method assumes the ability to pre-sample activity duration times[20], and
assumes that any queueing discipline used is non-preemptive. The protocol itself is quite
simple. As applied to a queueing network it works as follows. First, whenever a job enters
service, the queue to which the job will be routed is immediately notified of that arrival
(sometime in the future), and the receiving queue computes a service time for the new arrival.
These two actions constitute lookahead, a concept which is key to the protocol's success. Now
imagine that all events with time-stamps less than t have already been processed and that
the processors are globally synchronized. For each queue we determine the time-stamp of the