Introduction To Time Management Siddharth Misra
Background Distributed Simulation which is nothing but simulation on LAN became a popular tool for the military to train personnel's and simulate combat.
Motivation The order of events arriving in distributed simulation cannot be guaranteed i.e. the events may not arrive in the order of cause and effect due to delays in network traffics and processing. Logical Sequence of Events Fired Missile at time 0 seconds. Target destroyed at time 3 seconds. Fired Missile at time 0 seconds.
Missile fired at time 0 seconds. Contd… Target destroyed at time 3 seconds. Communication Delay of 3 seconds. No Communication Delay. Target Destroyed before it has been fired upon Missile fired at time 0 seconds. No Communication Delay.
Purpose Time management services is therefore used to ensure that events arrive at each federate in correct order. Also, it is used to ensure that another execution of same simulation results in the same ordering.
Time Management Schemes The two time management schemes for the advance in time of a simulation discussed here are – 1.Conservative Synchronization. 2.Optimistic Synchronization.
Conservative Synchronization is a scheme where none of the simulations advances its time until it is sure that it cannot receive any events in the past
Disadvantages Pessimistic approach in the sense it processes only those events that are considered to be safe As there is no event after time 12 therefore the event at 12 is not safe as the simulation can expect some event before time 12. Blocked
Contd… This scheme also introduces deadlocks. cycle
Optimistic Synchronization is a scheme in which a simulation processes events as they arrive; possibility that a simulation may receive events in its past causing it to perform roll back operations which make the simulation go back to a state which it has saved.
Contd… 11 SBSB 13 SDSD 18 SBSB 22 SCSC 25 SDSD 28 SCSC 36 SBSB 32 SDSD SASA processed! SBSB SASA SCSC SDSD late messages cause roll back 32
Disadvantages A critical problem faced here is whether the system spends most of its time executing incorrect computations and rolling them back. Another problem faced here is the need to save states which incurs huge memory overheads.
Summary Both the approaches discussed here have their own pros & cons and one might be better suited than another for an application depending on the type of application. Based on the disadvantages of the above a third approach will be presented shortly.