Hi there...can someone please explain the difference of 'count = 0' and 'count = -1' is in the following algorithm:
Initialization:
avg = 0
count = -1
for each packet arrival calculate new avg:
if the queue is nonempty
avg = (1 wq) avg + wq q
else
m = f (time q_time)
avg = (1 wq)m avg
if minth < avg < maxth
count = count + 1
calculate probability pa:
pb = maxp (avg minth) / (maxth minth)
pa = pb / (1 count * pb)
with probability pa:
if probability low
enqueue packet and dont drop
else if probability high
randomly/linearly drop arriving packets
count = 0
else if avg > maxth
drop all arriving packets
count = 0
else if avg < minth
enqueue packet (no drop mode)
count = -1
q_time = time
Initialization:
avg = 0
count = -1
for each packet arrival calculate new avg:
if the queue is nonempty
avg = (1 wq) avg + wq q
else
m = f (time q_time)
avg = (1 wq)m avg
if minth < avg < maxth
count = count + 1
calculate probability pa:
pb = maxp (avg minth) / (maxth minth)
pa = pb / (1 count * pb)
with probability pa:
if probability low
enqueue packet and dont drop
else if probability high
randomly/linearly drop arriving packets
count = 0
else if avg > maxth
drop all arriving packets
count = 0
else if avg < minth
enqueue packet (no drop mode)
count = -1
q_time = time