|
Site Navigation
Simulator
|
TCP Simulator Operation
=>
Simulator Engine
Simulator EngineThe simulator engine provides the TCP and Transmission Link Layers with an event scheduler that allows them to schedule events for future execution. The following is a brief description of how the engine works. For a complete explanation, please refer to Section 3.2 in the thesis.Simulator Engine ComponentsThe TCP simulator engine consists of 3 components.
These components interact as follows.
Simulator Engine Operation ExampleA practical example of how events are scheduled for future execution using the simulator engine is provided below. This example shows what occurs when a TCP Layer schedules a TCP timer (any type) expiry event.
Steps 1-3 shows what occurs when the TCP Layer wishes to set a TCP timer (Step 1) of any type; a new Queue Event corresponding to that timer is created (Step 2) and placed on the Event Queue to be executed at some future time corresponding to the expiry time of the timer (Step 3).
Steps 4-8 then shows how the scheduled Queue Event is subsequently dispatched; The Timer Engine advances the simulator time by incrementing the time counter (Step 4) and calling the Event Queue to dispatch any scheduled Queue Events (Step 5). When the Timer Engine's time counter reaches the TCP Timer Queue Event's scheduled execution time, the Event Queue dispatches the queue of previously scheduled Queue Events (Step 6), including the TCP Timer Queue Event (Step 7), causing the TCP Timer's handler in the TCP Layer to be activated (Step 8) to process the event. |