P21. Consider the following figure, which is similar to Figures 7.22 – 7.25. Ans
ID: 3767904 • Letter: P
Question
P21. Consider the following figure, which is similar to Figures 7.22 – 7.25. Answer the following questions:
1. Assuming FIFO service, indicate the time at which packets 2 through 12 each leave the queue. For each packet, what is the delay between its arrival and the beginning of the slot in which it is transmitted? What is the average of this delay over all 12 packets?
2. Now assume a priority service, and assume that odd numbered packets are high priority, and even numbered packets are low priority. Indicate the time at which packets 2 through 12 each leave the queue. For each packet, what is the delay between its arrival and the beginning of the slot in which it is transmitted? What is the average of this delay over all 12 packets?
3. Now assume round robin service. Assume that packets 1, 2, 3, 6, 11, and 12 are from class 1, and packets 4, 5, 7, 8, 9, and 10 are from class 2. Indicate the time at which packets 2 through 12 each leave the queue. For each packet, what is the delay between its arrival and its departure? What is the average delay over all 12 packets?
4. Now assume weighted fair queuing (WFQ) service. Assume that odd-numbered packets are from class 1, and even- numbered packets are from class 2. Class 1 has a WFQ weight of 2, while class 2 has a WFQ weight of 1. Note that it may not be possible to achieve an idealized WFQ schedule as described in the text, so indicate why you have chosen the particular packet to go into service at each time slot. For each packet what is the delay between its arrival and its departure? What is the average delay over all 12 packets?
5. What do you notice about the average delay in all four cases (FCFS, RR, priority, and WFQ)?
Explanation / Answer
Solution to question 1.:
Using FIFO scheduling the departure time for the packets are:
Packet 1 : delay = 0; Packet 2 : delay = 1; Packet 3 : delay = 1; Packet 4 : delay = 2; Packet 5 : delay = 2; Packet 6 : delay = 2; Packet 7 : delay = 3; Packet 8 : delay = 2; Packet 9 : delay = 3; Packet 10 : delay = 2; Packet 11 : delay = 2; Packet 12 : delay = 3; so now the average delay of all twelve packets : average delay = 23 /12.
Solution to question 2:
The delay of each packet can be calculated by using the arrival and beginning time in which the packet is transmitted. Under the priority scheduling the packet departure time is :
Packet 1 : delay = 0; Packet 2 : delay = 2; Packet 3 : delay = 0; Packet 4 : delay = 5; Packet 5 : delay = 0; Packet 6 : delay = 5; Packet 7 : delay = 1; Packet 8 : delay = 4; Packet 9 : delay = 0; Packet 10 : delay = 3; Packet 11 : delay = 0; Packet 12 : delay = 3;
So now the average delay of all twelve packets : average delay = 23 /12.
Solution to question 3:
Using the Round Robin Scheduling
Packet 1 : delay = 0; Packet 2 : delay = 2; Packet 3 : delay = 3; Packet 4 : delay = 0; Packet 5 : delay = 0; Packet 6 : delay = 4; Packet 7 : delay = 2; Packet 8 : delay = 2; Packet 9 : delay = 4; Packet 10 : delay = 4; Packet 11 : delay = 0; Packet 12 : delay = 2;
So now the average delay of all twelve packets : average delay = 23 /12.
Solution to question 4:
Here we have to use the weighted fair queuing (WFQ) .which is complex than the other scheduling algorithms. Assume that three slots are required for each round. Here there are two classes class 1 and class 2 so if class 1 and class 2 contain the packets to be served then class 1 is given two time slots and class 2 gets only one time slot.
Now calculating the delay we get :
Packet 1 : delay = 0; Packet 2 : delay = 2; Packet 3 : delay = 0; Packet 4 : delay = 4; Packet 5 : delay = 0; Packet 6 : delay = 5; Packet 7 : delay = 1; Packet 8 : delay = 4; Packet 9 : delay = 1; Packet 10 : delay = 3; Packet 11 : delay = 0; Packet 12 : delay = 3;
So now the average delay of all twelve packets : average delay = 23 /12.
Solution to question 5:
We can find that the average time delay in all cases are same.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.