Sie sind auf Seite 1von 5

1

Tutorial 11 (Friday Week 12): IP Traffic Management


and Qos Concepts
REVIEW QUESTIONS
Important:
- Do not submit the pages that are torn from a note book with the brushy paper edgings.
- Clearly written or typed on A4 papers. Non-A4 papers are not accepted.
- Recommended to use the Tutorial Review Template on Moodle.
- Submit your review (hardcopy) to the tutor of your scheduled tutorial class in Week 12.
- Plagiarism: 50% - 100% total mark deduction for each student involved.

1. Consider the above figure. Packets 1, 2, 3, 6, 9 and 12 belong to Class 1. The remaining packets
belong to Class 2. Answer the following questions:
(a) Assume a priority service with Class 1 of a higher priority. For each packet what is the delay between
its arrival and the time it is served? Calculate the average delay over all 12 packets, the total delay of
the packets in Class 1, and the total delay of the packets in Class 2.
(3 marks)
(b) Now assume round robin service. For each packet what is the delay between its arrival and the time it
is served? Calculate the average delay over all 12 packets, the total delay of the packets in Class 1,
and the total delay of the packets in Class 2.
(3 marks)
(c) Now assume weighted round robin service. Class 1 has a weight of 1, while Class 2 has a weight of 2.
For each packet what is the delay between its arrival and the time it is served? Calculate the average
delay over all 12 packets, the total delay of the packets in Class 1, and the total delay of the packets in
Class 2.
(3 marks)

2
Notes:
- In all questions (a), (b) and (c), you should complete the above diagram, showing clearly the order
of packets in service as well as the departure order. An example of Packet 1 has been illustrated in
the above figure.
- Use the table below (some values have been pre-filled) to calculate delays in each question.
Packet
1
2
3
4
5
6
7
8
9
10
11
12

Time being served (i.e. in service)


0

Time arriving at the queue


0
2
1
1

Delay
0

Average Delay
Total Delay of Packets 1, 2, 3, 6, 9 and 12
Total Delay of Packets 4, 5, 7, 8, 10 and 11

2. The data at the output of a token bucket algorithm has the long-term average rate of 250 packets per
second and maximum burst size of 15 packets. Assume that the input and output links of this token
bucket have infinite capacities. Determine the average token rate r and the bucket depth b of this
algorithm.
(2 marks)

TUTORIAL QUESTIONS
1. Consider a simple leaky bucket algorithm used for shaping/policing a peak rate of 1000 packets per
second which has a buffer size of 2 packets. Fill the following table and determine what the policy
decisions (conforming, i.e. accepting, or non-conforming, i.e. discarding) for packets arriving at the time
instants 10, 11, 11.2, 11.5, and 12 ms are. Assume that packets arriving at the system will be emitted at
the next leak time (with an integer time value) if conformant, and the bucket is empty at the time instant
10 ms.
What are the implications (meanings) if the buffer allocated to this system has a zero-size, instead of
the size of 2 packets?
Packet arrival
(ms)
10
11
11.2
11.5
12

No. of packets already in the bucket


(before this arrival)

Policing decision
(conforming/non-conforming)

2. Consider the implementation of a leaky bucket scheduler in the following figure. The scheduler checks
whether the buffer is full before accepting new arrivals. If the buffer is full, the arriving packets will be
discarded.

Remove packets at
a constant rate
Arrival

N
Departure

Full?

Queue
Y

Discard

Leaky Bucket Implementation


The data at the input and output of the scheduler are as follow. Leak rate is 3 Mbps. Each time slot is 1
second. For simplicity, assume that there is no delay in packet servicing, i.e. if there are enough data in
the queue, these data will be output immediately to the output (at the data rate 3 Mbps). Also assume
that data is transmitted at the beginning of time slots. What is the minimum capacity of the buffer?

Data rate

12 Mbps

Input
2
Mbps
1

5 6 7
Bursty data

9 10 Time slot

9 10 Time slot

Data rate
3 Mbps

Output
1

Hint: Complete the following table (some items have already been pre-filled) to find the answer.
Time slot

1
2
3
4
5
6
7
8
9
10

Arriving Data (Mb)

12
12
0

Data left in buffer


from previous time
slot (Mb)
0
9

Output (Mb)

3
3

Total data in buffer


(Mb)
9

3. Consider the figure below. Assume that odd-numbered packets belong to Class 1, and even-numbered
packets belong to Class 2. Answer the following questions:
a. Assuming a priority service with Class 1 of a higher priority. For each packet what is the delay between
its arrival and the beginning of the slot in which it is served? Calculate the average delay over all 12
packets, the total delay of the packets in Class 1, and the total delay of the packets in Class 2.
b. Now assume round robin service. For each packet what is the delay between its arrival and the
beginning of the slot in which it is served? Calculate the average delay over all 12 packets, the total
delay of the packets in Class 1, and the total delay of the packets in Class 2.
c. Now assume weighted round robin service. Assume that Class 1 has a weight of 2, while Class 2 has a
weight of 1. For each packet what is the delay between its arrival and the beginning of the slot in which
it is served? Calculate the average delay over all 12 packets, the total delay of the packets in Class 1,
and the total delay of the packets in Class 2.
d. What do you notice about the average delay in all three cases (priority, RR, WRR)?

Hint: Use the following table for all the above questions
Packet
1
2
3
4
5
6
7
8
9
10
11
12

Time leaving the queue (to be served)

Time arriving at the queue

Average Delay
Total Delay of Odd Packets
Total Delay of Even Packets

Delay

5
4. Consider the token bucket scheduler in the figure below. The bucket can hold up to 2 tokens and is
initially full at the time slot t = 0. The output link speed is such that if two packets obtain tokens at the
beginning of a time slot, they can both go to the output in the same time slot. The system works as
follows:

Packets (if any) arrive at the beginning of the slot. For instance, in the figure, packets 1, 2 and 3 arrive
in slot 0. Packets will be put on the queue in a FIFO manner.
The queued packets (if any) will each remove a token from the token bucket and go to the output link in
that time slot. For instance, in the figure, packets 1 and 2 each remove a token from the bucket (since
there are initially two tokens) and go to the output link during slot 0.
Time then advances to the next time slot. A new token is added to the token bucket if it is not full, since
the token generation rate is r = 1 token/slot. These steps repeat.

Answer the following questions:


a. For each time slot, identify which packets appear at the output after removing the token(s) from the
bucket. For example, for the time slot t = 0 in this exercise, packets 1 and 2 appear at the output link
during slot 0
b. For each time slot, identify the packets that are in the queue, and the number of tokens in the bucket,
immediately after the arrivals have been processed, but before any of the packets have passed through
the queue and removed a token. For example, for the time slot t = 0 in this exercise, packets 1, 2 and 3
are in the queue, and there are two tokens in the buffer
c. From the table, give some comments/interpretation on the token bucket scheduler.
Hint: To answer questions a and b, fill the following table
Time Slot

Packets arrive

0
1
2
3
4
5
6
7
8

1, 2, 3
4
5
6
7, 8
9, 10
-

Packets in the
queue
1, 2, 3
3, 4

Number of tokens
in bucket
2
1

Packets at
output
1, 2
3