Title: Lookback
1Lookback
- A New Way of Exploiting Parallelism in Discrete
Event Simulation
A brief look at the work of Gilbert Chen and
Boleslaw Syzmanski by Sean Hutchins
2Outline
- Brief Introduction
- What is Lookback?
- -Lookback Constraint
- -Lookback Procedure
- Local Rollback
- Impact Time
- - Message Strength
- Lookback versus Lookahead
- - a possible improvement?
- Conclusion
3Introduction
The PDES field has been dominated by study of
conservative and optimistic protocols. Sadly both
have large cons
- Some Conservative Cons
- Efficiency limited by the amount of lookahead
- lookahead is hard or impossible to tell in real
world - null messages often incur significant overhead
- Some Optimistic Cons
- state saving requires storing/accessing large
amounts of memory - handling of anti-messages may incur slow downs
and larger memory latencies
4WHAT CAN WE DO????
What if there was some way of reducing the number
of rollbacks in optimistic simulations?
What if there was some way of lowering execution
times of Conservative protocols and maybe even
distinguishing their reliance upon lookahead??
There is a way! Its called Lookback!
5What Is Lookback?
- Informally, Lookback is the ability of a logical
process to execute out-of-timestamp order events,
stragglers, without impacting states of other
logical processes.
- Formally, if at simulation time T, a LP can
process stragglers with timestamp down to T-L,
without sending anti-messages, this LP is said to
contain a lookback of L. The window T-L, T is
called the lookback window, and the lower end of
this window, T-L is referred to as the virtual
lookback time (VLT). The procedure used to
process events falling into this window is called
the lookback procedure.
- Stragglers with timestamp larger than the VLT can
be processed by the lookback procedure, thus
rollback and recovery procedures can be less
frequently invoked.
6FCFS Server Example
- A logical process that simulates a server with a
FCFS queue receiving tasks for processing and
sending processed tasks to other processes in
timestamp order.
7Lookback Constraint
- Any newly arriving task with a arrival time less
than 7 would need to be processed before the
departing task, changing its departure time.
Since the departing task carries its departure
time to some other logical process, the change
required in such a case is no longer local!
- To avoid any such causality errors or rollbacks
at other LPs, each LP must obey the lookback
constraint!
- Lookback Constraint after processing each event,
the VLT must be smaller or equal to the minimum
timestamp value of all unprocessed events of this
logical process (including those that will arrive
at the logical process later) the LBTS usually
found using a derived variant LB-GVT.
8Constraint Adherence
- In order to adhere to the lookback constraint,
LPs, before processing an event, must determine
if the execution of the event would violate the
lookback constraint. It must pre-compute the VLT
without executing the event.
- Heres the main algorithm of the lookback-based
protocols like the previous. Because no straggler
with a TS larger than the lookback will ever be
received it can be deemed rollback free
While (the termination condition is not met)
find the earliest local event e
pre-compute VLT based on e if VLT gt LBTS
process e else
update LBTS end if End while
9Lookback Procedure
- Steps in processing stragglers that fall into the
lookback window. - If the LP has determined that the straggler may
be safely processed according to the notion of
lookback, it will first try to repair the damage
caused by the wrong order of event execution. - It will then process the straggler based on the
state that has been repaired
- This approach will reduce the number of rollbacks
significantly and sometimes as in the simple
example, completely eliminate them.
10Local Rollback
- The previous FCFS algorithm attempted to process
stragglers directly and easily did so, but this
may not always be the case and may prove vary
difficult to implement due to the possibility of
exponential event arrival combinations
- Whenever this direct lookback procedure is too
complicated to implement, and all other attempts
at a suitable procedure have failed, a universal
lookback procedure may be used.
- Upon arrival of a straggler, the universal
lookback procedure rolls back all processed
events with a timestamp larger than the timestamp
of the straggler, in decreasing timestamp order
(no anti-messages are necessary during this
step). Then, it processes the straggler, and
finally re-executes the rolled back events, in
increasing time stamp order.
11Local Rollback
- The universal lookback procedure can be
classified as a local rollback protocol because
it avoids anti-messages but allows aggressive
processing of events.
- Two other local rollback protocols, SRADS and
Breathing Time Window require logical processes
to work collaboratively, by exchanging event info
to avoid sending any erroneous messages. In the
lookback-based protocol, however, each logical
process alone can determine whether a message can
be sent out (by allowing or disallowing execution
of the corresponding message)
Isnt that cool???
12Impact Time
- OK, so lookback is cool and all but how do we
know if it exists, and if it does exist, how
large is it???
- Impact time of a message the lower bound on the
TS of any stragglers that can change or cancel
the message.
- When a straggler arrives with a TS smaller than
the messages IT, the straggler will be thrown out
because its processing would cause anti-messages
to be sent.
- The maximum amount of lookback is equal to the
maximum impact time of all the messages that it
creates. When a straggler arrives, only a simple
timestamp comparison is required for anti-message
avoidance.
13Message Strength
- What if the impact time of a message is to its
timestamp?
- Use the strength of the message!
- Message strength the number of stragglers needed
to affect this message. (only stragglers with TS
less than message are counted)
- When a straggler arrives, the strength of a
message is checked. If it is not already zero, it
is decremented. When it reaches zero an
anti-message must sadly be sent out ? to cancel
this message.
14Lookback Versus Lookahead
- How often can lookback be found? How useful is
it? Seeing that Lookahead has been proven useful
a connection between the two should suffice the
usefulness. - Even though one deals with the future the other
the past, if the simulation clock is aggressively
advanced, future suddenly becomes the past and it
can be easily seen that there is a connection
between the two.
- When at time T there is a lookahead of L, we can
aggressively advance the simulation clock to TL,
and process any stragglers. The property of
lookahead guarantees that no message with a
timestamp no smaller than TL can be affected by
stragglers earlier than T, making the lookback of
at least L.
15Lookback Versus Lookahead
- Lookahead gives two guarantees
- 1) ensure the validity of the message
- 2) Promises a lower bound on the timestamp of
messages that will be delivered later.
- Lookback only guarantees the first, making it
clear to see that lookback is always more common
than lookahead, and that lookback is exactly
equal to lookahead when messages are delivered in
timestamp order.
16Improvement to Lookahead?
- Jefferson and Reiher characterized conservative
protocols as mechanisms that never use any form
of event undoing, abortion, or rollback
- Direct lookback based protocols, in which every
processed event is committed can be thought of as
conservative.
- Previous correct conservative simulation
mechanisms used elementary scheduling and did not
take into consideration any mechanisms that
ensured correct execution of stragglers that
could give way to major efficiency gains.
17Conclusion
- Lookback-based protocols introduce a new
technique to exploit intra-logical process
parallelism in simulation models. - Lookback is closely related to lookahead, but
lookback is more common - Lookback-based protocols offer no real solution
to PDES problems. It does not exist in all
models, and even if it does the lookback
procedure may be to complicated or non-efficient. - The utilization of lookback complicates the
simulation modeling, because out-of-timestamp
execution has to be taken into consideration. - More research needs to be done, and this is meant
only as an eye opener to what may lie ahead in
PDES design.
18Mahalo!