SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
James F. Kurose, Keith W. Ross
Chapter:
Multimedia Networking
Exercise:
Problems
Question:18 | ISBN:9780132856201 | Edition: 6

Question

Consider the figure below. Answer the following questions:

 

a. 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?

b. 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?

c. 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?

d. Now assume weighted fair queueing (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 sched- ule 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?

e. What do you notice about the average delay in all four cases (FIFO, RR,priority, and WFQ)?

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

a)

 

Consider the FIFO(First In First Out) service:

The time at which packets 2 through 12 each leave the queue. So, the packet that entered the queue first(arrival time), leaves the queue first(leaving time) for the FIFO service.

 

 The following table is used to calculate the delay between its arrival and the beginning of the slot in which it is transmitted by using given figure:

Packet

Arrival time

Leaving time

Delay Time(=leaving time – arrival time)

1

0

0

0

2

0

1

1

3

1

2

1

4

1

3

2

5

3

5

2

6

2

4

2

7

3

6

3

8

5

7

2

9

5

8

3

10

7

9

2

11

8

10

2

12

8

11

3

 

\large The\ average\ of\ this\ delay\ over\ all\ 12\ packets=\frac{Total\ number\ of\ delays}{Total\ number\ of\ packets}

The\ average\ of\ this\ delay\ over\ all\ 12\ packet=\frac{0+1+1+2+2+2+3+2+3+2+2+3}{12}

\boldsymbol{\mathbf{} The\ average\ of\ this\ delay\ over\ all\ 12\ packet = 1.92}

 

b)

 

Consider the priority queue service:

Assume that odd-numbered(1, 3, 5, 7, 9, and 11) packets are high priority and even-numbered(2, 4, 6, 8, 10, and 12 ) packets are low priority. So, the packet with higher priority is transmitted before the packet with lower priority for priority queuse service.

The following table data is used to calculate the delay between its arrival and the beginning of the slot in which it is transmitted by using given figure:

Packet Arrival time  Leaving time Delay Time(=leaving time – arrival time)

1

0

0

0

2

0

2

2

3

1

1

0

4

1

6

5

5

3

4

1

6

2

7

5

7

3

3

0

8

5

9

4

9

5

5

0

10

7

10

3

11

8

8

0

12

8

11

3

\large The\ average\ of\ this\ delay\ over\ all\ 12\ packets=\frac{Total\ number\ of\ delays}{Total\ number\ of\ packets}

The\ average\ of\ this\ delay\ over\ all\ 12\ packet = \frac{0+2+0+5+1+5+0+4+0+3+0+3}{12}

\boldsymbol{\mathbf{} The\ average\ of\ this\ delay\ over\ all\ 12\ packet = 1.92}

 

c)

 

Consider the 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 as a packet of each class leaves the queue alternatively in a round robin service.

The following table data is used to calculate the delay between its arrival and the beginning of the slot in which it is transmitted by using given figure:

Packet Arrival time  Leaving time Delay Time(=leaving time – arrival time)

1

0

0

0

2

0

2

2

3

1

4

3

4

1

1

0

5

3

3

0

6

2

6

4

7

3

5

2

8

5

7

2

9

5

9

4

10

7

11

4

11

8

8

0

12

8

10

2

 

\large The\ average\ of\ this\ delay\ over\ all\ 12\ packets=\frac{Total\ number\ of\ delays}{Total\ number\ of\ packets}

\large The\ average\ of\ this\ delay\ over\ all\ 12\ packets=\frac{0+2+3+0+0+4+2+2+4+4+0+2}{12}

\boldsymbol{\mathbf{} The\ average\ of\ this\ delay\ over\ all\ 12\ packet = 1.92}

 

d)

 

Consider the weighted fair queueing (WFQ) service:

Assume that odd- numbered packets(1, 3, 5, 7, 9, and 11 ) are from class 1, and even-numbered packets(2, 4, 6, 8, 10, and 12 ) are from class 2 as 2 packets of class 1 leaves in a turn and then the turn comes to class 2 and only one packet may leave in one turn.

The following table data is used to calculate the delay between its arrival and the beginning of the slot in which it is transmitted by using given figure:

Packet Arrival time  Leaving time Delay Time(=leaving time – arrival time)

1

0

0

0

2

0

2

2

3

1

1

0

4

1

5

4

5

3

3

0

6

2

7

5

7

3

4

1

8

5

9

4

9

5

6

1

10

7

10

3

11

8

8

0

12

8

11

3

 

\large The\ average\ of\ this\ delay\ over\ all\ 12\ packets=\frac{Total\ number\ of\ delays}{Total\ number\ of\ packets}

\large The\ average\ of\ this\ delay\ over\ all\ 12\ packets=\frac{0+2+0+4+0+5+1+4+1+3+0+3}{12}\boldsymbol{\mathbf{} The\ average\ of\ this\ delay\ over\ all\ 12\ packet = 1.92}

 

NOTE: The correct average value is 1.9166. Then, round off to the two decimal places as per mathematical procedure. Hence, the round off the average value from 1.9166  to 1.92.  It is applicable to all mathematical calculation in this answer.

 

e)

 

The aveerage delay over all 12 packets values are equal, but the delays of the packet values are different for FIFO, RR,priority, and WFQ.

0 0

Discussions

Post the discussion to improve the above solution.