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

[ns] Forcing events...



Hi all,
as I saw in recent post I'm facing a serious problem concernig simultaneous
event in NS.
The problem is this: I write a queueing algorithm similar to Virtual clock
or EDF , that use varible deadline for each packet (SCED). When two packets
come at same time I need to select one with smallest deadline.
For example suppose there are two queue empty:
pkt 1 arrives to queue 1at time 2.00 with deadline 2.2
pkt2 arrives to queue 2 at time 2.00 with deadline 2.4
So the order of dequeuing is pkt1 -- pkt2.

 Now, by examination of trace file I can see that the arrive of pkt2 is
scheduled at time 2.00, but before of pkt1 so because of queue empty the
next event is dequeing of this packet that occurs at 2.00 and subsequent
event is deque of pkt1, so this has to wait the trasmission of pkt2 and is
delayed.
My question is: how to force time scheduler to enque first all packet that
arrive at same time and next to pick a packet for transmission. I don't know
exactly how time scheduler works in NS.

Please give me an hint!

Antonello