Download Solutions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Computational fluid dynamics wikipedia , lookup

Traffic flow wikipedia , lookup

Scheduling (computing) wikipedia , lookup

Transcript
ECE 466 - Computer Networks II
Problem Set #8 : Fair Scheduling
1. Consider an arrival scenario from two flows to a WFQ scheduler, with arrival times and packet
sizes given as follows:
Packet label
Arrival time
Packet Size
1a
1
1
Flow 1
1b 1c
2
3
1
2
1d
11
2
2a
0
3
Flow 2
2b 2c
5
9
2
2
• Assume that the transmission rate is (C = 1), i.e., it takes one time unit to transmit a
packet of size 1, two time units to transmit a packet of size 2, etc..
• Assume the two flows have weights such that φ1 = 1/3 and φ2 = 2/3.
(a) Show the value of the system virtual time for t ≤ 13.
(b) Devise the transmission schedule of a fluid-flow WFQ scheduler. Provide the departure
times of all packets. (Refer to individual packets using the labels given in the table).
(c) Devise a transmission schedule of a packet-level WFQ scheduler. Provide the departure
times of all packets. (Refer to individual packets using the labels given in the table).
Solutions: The example is straight out the Parekh/Gallager paper. Note that we need to
select a values for φ1 and φ2 . Here we select φ1 = 1/3 and φ2 = 2/3.
1
22
21
20
Virtual time: V(t)
19
Slope = 3
18
17
16
Slope = 3/2
15
14
13
Slope = 3
12
11
10
Slope = 1
9
8
7
Slope = 3
6
5
4
Slope = 1
3
2
1
Slope = 3/2
0
Backlogged
Flows B(t)
1
2
2
3
1,2
4
5
1
6
7
1,2
8
9
10
1
Figure 1: Virtual Time for Problem 3.
2
2
11
12
1
13
packet size
1c
1d
2
Arrivals
from
Flow 1
1a
1b
1
2
1
0
3
4
5
6
7
8
9
10
11
12
13
14
time
10
11
12
13
14
time
13
14
time
packet size
2a
2b
2c
2
Arrivals
from
Flow 2
1
0
Fluid-flow
WFQ
schedule
1
2
3
4
5
6
1a
2a
0
1
2
3
2a
0
1
4
1a
2
8
9
1c
1b
2a
Packet-level
WFQ
schedule
7
3
5
1b
4
1c
2b
6
7
2b
5
6
8
2c
9
1c
7
8
10
1d
11
2c
9
10
12
1d
11
12
13
14
time
Figure 2: Arrival Scenario for Problem 3.
2. Consider a service discipline NFQ (Not Fair Queueing) which services packets according to
the priority index
(j)
(j)
(j)
Fk = V (ak ) + Lk /φj
NFQ is inferior to packetized WFQ in emulating the fluid-flow WFQ and satisfying the
weighted fairness property in the definition of fluid-flow WFQ.
(a) Describe in words why NFQ is inferior to WFQ: what property (or properties) should it
possess that it does not?
(b) Construct a numerical example with two flows to illustrate WFQ’s superiority to NFQ.
Solution:
• (a) The “max” in WFQ’s definition of virtual finishing time, in essence queues a particular session’s traffic behind itself. Since NFQ does not have the max, a session can send
an arbitrarily large amount of traffic at a particular time and receive the same priority
index for all of this traffic, potentially starving out other users. In other words, NFQ
lacks fairness and protection from misbehaving users.
(b) As a simple example, consider two sessions with φ1 = φ2 , C = 1, fixed sized packets,
and an empty queue at t = 0. If session 1 sends 10 packets at t = 0, all receive the same
priority index of 1 under NFQ, while the indexes are 1, 2, · · · , 10 under WFQ.
If session 2 sends 1 packet at t = 1, that packet has priority index 2 and will be serviced
last under NFQ while it will be serviced 2nd or 3rd under WFQ.
3
3. Consider two flows. The first with packets of size 2 and 2 arriving at times 3 and 5, and the
second with packets of size 1, and 3 arriving at times 0 and 2. Further, let φ1 = 2φ2 .
(a) Sketch the arrival and departure functions, for the fluid-flow WFQ and for packetized
WFQ for C = 1.
(b) Sketch the virtual time V (t) (Set V (0) = 0).
(c) Provide the departure times of the packets under fluid-flow WFQ and packetized WFQ.
Solution:
(a) The arrival and departure functions are sketched in the figure (In the figure, the curve
labeled GPS refers to fluid-flow GPS, and the curve labeled WFQ is for packetized
WFQ).
A[0,t]
4
GPS
3
A[0,t]
4
WFQ
3
2
GPS
2
WFQ
1
1
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
(b) The system virtual time is shown in the figure.
V(t)
4
3
2
1
t
1
(c)
2
3
Packet number
arrival times
fluid-flow WFQ
packetized WFQ
4
5
6
Session 1
1
2
3
5
6
9
7
9
4
7
8
Session 2
1
2
0
2
1
9
1
5
9
8
9