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

Re: Priority Queue



>    I try to implement a priority queue for my network topology.  I know
> that CBQ has a priority queue.  I also find out that there is a file
> called pri-queue.cc under the /ns directory.  I also realize that there is
> a field called prio_ under the TCP Agent.  So, if i want to implement the
> priority queue, should I use CBQ or the Queue/DropTail/PriQueue?  How do I
> do it if I should use PriQueue? (I try to use PriQueue for several ways
> but it still doesn't work.) 

Don't know much about CBQ, or the uses of the prio_ field in the TCP
agent. I can however, tell you about the priority queue. It's a very
simple queue that can give priority to certain types of network traffic.
The traffic types that get priority are programmed into the code - to
change which traffic gets priority you'd have to modify the recv() method
and recompile. It's not that difficult to do. The implementation of the
priority queue is as follows:
	if packet is priority packet - insert at head of queue
	else insert at tail of queue. 

It could be argued that there aren't really two logical fifo queues, one
of which gets priority over the other. If two priority packets arrive very
close together, then they could be reordered. However, I'd suspect that
CBQs can be used to implement two fifo queues one having priority over the
other.

Hth,
Sean.
-----
Sean Murphy,			Email: [email protected]
Teltec Ireland,			Phone: +353-1-7045080
DCU, Dublin 9,			Fax:   +353-1-7045092
Ireland.