Predict the Next Simulation Event

Predict the Next Simulation Event

Try Tap Step once to follow the packet arrival from the front of the future event queue into the Current event tile.

Follow the future-event queue and virtual clock

Discrete-event simulation

Waiting to dispatch

Virtual clock

Before A

Future-event queue · earliest first

Packet arrival | virtual time A

Timer fires | virtual time C

Current event

Waiting to dispatch

The future-event queue holds scheduled actions in virtual-time order. A packet arrival is the first action due.

Observe In frame 3 Transmission finishes appears ahead of Timer fires while the virtual clock stays at A. Frame 4 moves the finish into Current event and the clock jumps to B.
Explain The arrival handler schedules a transmission finish at B in frame 3. The engine dispatches in timestamp order, so its next jump is to B and the timer at C stays queued.

Technical boundaries. This trace uses symbolic virtual timestamps for one arrival, its transmission finish and a timer. The displayed clock tracks the model. Computation time can differ from simulated time, and real interrupt latency, scheduler jitter and timing races require hardware evidence.

Back to the chapter