45.3 Implementation Details

Tmix is an ns object that drives the generation of TCP traffic. Each Tmix object controls the operation of two applications: a Tmix Application used to simulate a TCP connection acceptor and a Tmix Application used to simulate a TCP connection initiator. Each of these applications is connected to a TCP Agent. Tmix supports both Full-TCP and one-way TCP agents (see the set-agent-type command).

Each initiator or acceptor cloud is represented by a single ns node that can produce and consume multiple TCP connections at a time (Figure [*]). For each TCP connection, Tmix creates (or allocates from the inactive pool, as described below) initiator and acceptor applications and their associated TCP Agents. After setting up and starting each connection, Tmix sets a timer to expire when the next new connection should begin. The times at which connections begin are governed by the connection vectors supplied by the user. Connection vectors may be specified by the user by setting a connection vector file for Tmix to read from. New connections are started according to the connection arrival times found in the connection vector file, without regard to the completion of previous connections.

Tmix handles the re-use of applications and Agents that have completed their data transfer. Each Tmix instance maintains 3 pools to manage applications and Agents - one pool for inactive TCP Agents and one pool each for active and inactive Tmix applications. The pool for active applications ensures that all active applications are destroyed when the simulation is finished. Active TCP Agents do not need to be placed in a pool because each active application contains a pointer to its associated TCP Agent. New objects are only created when there are no Agents or applications available in the inactive pools. (TCP Agents are required to be in the inactive pool for 1 second before they can be re-used.)



Subsections
Tom Henderson 2014-12-17