void dsREDQueue::selectQueueToDeque() {
// If the queue to be dequed has no elements, look
for the next queue in line:
int i = 0;
int NumQ = 2;
printf("******************** START ************************************\n");
if(schedMode==schedModeRR){
printf("Queue 0 : (%d)\n",redq_[0].getRealLength());
printf("Queue 1 : (%d)\n",redq_[1].getRealLength());
qToDq = (qToDq + 1) % NumQ;
#ifdef DEBUG
printf("The examined
queue is the No (%d) with current length (%d)\n",qToDq,redq_[qToDq].getRealLength());
#endif
printf("******************** END ************************************\n\n");
}
else if (schedMode==schedModeWRR) {
Trying an example with two physical queues I get the following output
(these logs are somewhere in the middle of the output file)
******************* START ************************************
Queue 0 : (0)
Queue 1 : (1)
The examined queue is the No (1) with current length (1)
******************** END ************************************
******************** START ************************************
Queue 0 : (13)
Queue 1 : (14)
The examined queue is the No (1) with current length (14)
******************** END ************************************
******************** START ************************************
Queue 0 : (1)
Queue 1 : (1)
The examined queue is the No (0) with current length (1)
******************** END ************************************
******************** START ************************************
Queue 0 : (0)
Queue 1 : (1)
I cannot understand many things
1) Which process changes the variable qToDq other that mine queueing
selection process
I would expect always to check the queues in the sequence 0,1,0,1...
2) Why in subsequent executions of that queueing selection method (selectQueueToDequeue)
(called from the dequeue method in the same file dsred.cc)
I see things like the Q1 having 14 packets and after that (in
the next execution of the dequeue method) 1
packet. I would expect to contain more that 13 packets.
Who else dequeued those missing packets ?
Thank you,
any help will be appreciated.
Leonidas
I
-- Leonidas A. Lymberopoulos Imperial College, Research Associate 180 Queen's Gate, Distributed Software Engineering Group London SW7 2BZ, U.K. Department of Computing, Phone: (+44|0) 207 594 8394 Fax: (+44|0) 207 581 8024 E-mail: [email protected]