• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

RED algorithm - explanation of difference between 'count = 0' and 'count = -1'

kurious

Junior Member
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 don’t 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
 
Back
Top