[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] threading accuracy -- timeouts



>Just for the sake of my question, propose that you have an agent sending
>packets at the request of several different timeouts -- 10 or more.
>(perhaps you're developing a rythm where you send one packet every 1
>second, one every 23 milliseconds one every 1.2 milliseconds etc.)
>Suppose also that there is a special packet header with these files, and
>that information gets put into these files depending on a boolean value
>in the c++ code. Now if I switch that value while the program is
>running, how accurate is the threading? Ie, if all of the packets sent
>after a data switch are supposed to have that data switched, are there
>going to be a few that don't make it with it? (Even one could be a big
>issue.) Is the threading possibly calling the threads early, or do we
>even know how accurate it is? 

Ns is not threaded, it's event driven.

Events should always execute in the correct order (since it's a
simulator, it will just take longer real time to run when it has more
events).

Events that are scheduled at exactly the same time should fire in a
deterministic but arbitrary order.

   -John Heidemann