[ns] Is it a BUG in Mac802_11 to defer and back-off in a same timer?
robin2046 at 163.com
Mon Jul 30 03:24:37 PDT 2007
I've been going through the source code of Mac802_11. And I find that in the standard distribution of ns when it's necessary to do deferral and back-off together, it often does like these:
*mhBackoff_.start(cw_, is_idle(), phymib_.getDIFS());
*mhDefer_.start(phymib_.getDIFS() + rTime);
But back-off procedure is interruptable and deferral can not be ¡°interrupted¡±, is this a BUG to use one timer to do two things?
If, in ns, we¡¯re backing off for a time of DIFS + rTime, and is interrupted when the time hasn¡¯t elapsed for more than DIFS, so the left time is rTime + sometime. And at the next time when we want to access the medium, the deferral time SHOULD be DIFS + REMAINING_TIME. But now the REMAINING_TIME equals to rTime + sometime, which is greater than the CW we chose before.
I am not sure whether I was right. I hope someone can help me. Any comment will be welcomed.
More information about the Ns-users