Download presentation

Presentation is loading. Please wait.

Published byJavier Ireton Modified over 3 years ago

1
1 Comnet 2010 Communication Networks Recitation 4 Scheduling & Drop Policies

2
2 Comnet 2010 Queueing Basics A queue consists of a scheduling discipline and a drop policyA queue consists of a scheduling discipline and a drop policy queued packets scheduling discipline: what packet gets sent next drop policy: what is dropped upon overflow input

3
3 Comnet 2010 Generalized Processor Sharing The ideal max-min fair scheduling schemeThe ideal max-min fair scheduling scheme –Visit each non-empty queue in turn –Serve infinitesimal from each –GPS is not implement able; we can serve only packets

4
4 Comnet 2010 Weighted Fair Queueing Problem: We need to serve a whole packet at a time. Solution: 1.Determine what time a packet, p, would complete if we served flows by GPS. Call this the packets finish time, F( p ). 2.Serve packets in the order of increasing finish time.

5
5 Comnet 2010 WFQ Round -- Virtual Time Round number is a real-valued variable that increases at a rate inversely proportional to the number/weight of active connectionsRound number is a real-valued variable that increases at a rate inversely proportional to the number/weight of active connections Updating the number of connections:Updating the number of connections: –A connection becomes active when a packet arrives to an empty queue –A connection becomes inactive when R(t) > F( p ), where p is the last packet served

6
6 Comnet 2010 Virtual time Example A L=1L=2 B C 1/3 1/2 1/3 1 F 1 =1 F 1 =2 F 2 =3.5

7
7 Comnet 2010 Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth Weights : 1:1:1:1 1 1 1 1 6 5 4 3 2 1 0 B1 = 3 A1 = 4 D2 = 2 D1 = 1 C2 = 1C1 = 1 Time 1 1 1 1 6 5 4 3 2 1 0 B1 = 3 A1 = 4 D2 = 2 D1 = 1 C2 = 1C1 = 1 A1B1C1D1 A2 = 2 C3 = 2 Weights : 1:1:1:1 D1, C1 Depart at R=1 A2, C3 arrive Time Round 1 C1 = 1 6 5 4 3 2 1 0 Time Weights : 1:1:1:1 1 1 1 1 B1 = 3 A1 = 4 D2 = 2 D1 = 1 C2 = 1C1 = 1 A1B1C1D1 A2 = 2 C3 = 2 A1 B1C2D2 C2 Departs at R=2 Round 1Round 2 C1 = 1 C2 = 1

8
8 Comnet 2010 Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth Weights : 1:1:1:1 1 1 1 1 6 5 4 3 2 1 0 A1 = 4 A1B1C1D1 A2 = 2 C3 = 2 A1B1C2D2 D2, B1 Depart at R=3 A1B1C3D2 Time Round 1Round 2Round 3 Weights : 1:1:1:1 1 1 1 1 6 5 4 3 2 1 0 B1 = 3 A1 = 4 D2 = 2 D1 = 1 C2 = 1C3 = 2C1 = 1 C1D1C2B1 D2 A 1 A2 = 2 C3 A2 Departure order for packet by packet WFQ: Sort by finish round of packets Time Sort packets 1 1 1 1 6 5 4 3 2 1 0 A1B1C1D1 B1 = 3 A1 = 4 D2 = 2 D1 = 1 C2 = 1C1 = 1 A2 = 2 C3 = 2 A1B1C2D2 A1 Depart at R=4 A1B1C3D2A1C3A2 Time Round 1Round 2Round 3Round 4 C3,A2 Departs at R=6 56 B1 = 3 D2 = 2 D1 = 1 C2 = 1C1 = 1 C2 = 1 C1 = 1

9
9 Comnet 2010 Problem with WFQ The large discrepancy between GPS and WFQ is WFQ could provide service for a session far ahead of GPS.The large discrepancy between GPS and WFQ is WFQ could provide service for a session far ahead of GPS. This large difference will result in unstable and less efficient network control algorithms.This large difference will result in unstable and less efficient network control algorithms.

10
10 Comnet 2010 WF2Q - Worst-Case Fair Weighted Fair Queuing Is a packet approximation algorithm of GPS.Is a packet approximation algorithm of GPS. WF 2 Q provides almost identical service with GPS, the maximum difference is no more than one packet size.WF 2 Q provides almost identical service with GPS, the maximum difference is no more than one packet size. Difference between WF 2 Q and WFQDifference between WF 2 Q and WFQ –In a WFQ system, when the server chooses the next packet for transmission at time t, it selects among all the packets that are backlogged at t, and selects the first packet that would complete service in the corresponding GPS. –In a WF 2 Q system, when the server chooses the next packet at time t, it chooses only from the packets that have started receiving service in the corresponding GPS at t, and chooses the packet among them that would complete service first in the corresponding GPS.

11
11 Comnet 2010 WF²Q Packet approximation algorithm of GPS.Packet approximation algorithm of GPS. Choosing the packet with the smallest finish time among all the packets that have already started service in the corresponding GPS emulation.Choosing the packet with the smallest finish time among all the packets that have already started service in the corresponding GPS emulation.

12
12 Comnet 2010 Problem with WF 2 Q The time complexity of implementing WF 2 Q is high. Because its based on a virtual time function which is defined with respect to the corresponding GPS system. It leads to considerable computational complexity due to the need for simulating events in the GPS system.The time complexity of implementing WF 2 Q is high. Because its based on a virtual time function which is defined with respect to the corresponding GPS system. It leads to considerable computational complexity due to the need for simulating events in the GPS system.

13
13 Comnet 2010

14
14 Comnet 2010 GPS vs. WFQ 5 classes A, B, C, D, E5 classes A, B, C, D, E Weight 2 for class AWeight 2 for class A Weight 1 for other classesWeight 1 for other classes Link speed: 1 BpsLink speed: 1 Bps

15
15 Comnet 2010 GPS vs. WFQ (cont.) t=0t=0 –2x4Byte packets in A –1x3Byte packet in B t=1t=1 –1x2Byte packet in C –1x4Byte packet in D t=2t=2 –1x4Byte packet in E –1x2Byte packet in A

16
16 Comnet 2010 GPS Simulation 1/3 2/3 2/5 1/5 1/6 (T-2) 1/3 (T-2) A B D C E 012T T(A1) = 10 4/5 T(C1) = 12 4/5 (4-(2/3+2/5))/(1/3) =8 4/5, 8 4/5 +2= 10 4/5 1/3

17
17 Comnet 2010 Simulation (cont.) After 12 4/5 seconds, the status of the partial transmissions is:After 12 4/5 seconds, the status of the partial transmissions is: –2/3 Bytes of A2 (total size: 4 bytes) –2 1/3 Bytes of B1 (total size: 3 bytes) –2 Bytes of D1 (total size: 4 bytes) –1 4/5 Bytes of E1 (total size: 4 bytes) Next Packet to finish is B1Next Packet to finish is B1

18
18 Comnet 2010 GPS Simulation 1 1/3 2/3 1/4 T 1/2 T A B D C E …12.816 2/15T T(B1) = 16 2/15 T(A2) = 20 2/15 T(D1) = 21 7/15 2 2 2 1/3 1 4/5 2/3

19
19 Comnet 2010 Simulation (cont.) After 21 7/15 seconds, the status of the partial transmissions is: – 2/3 Bytes of A3 (total size: 2 bytes) – 3 4/5 Bytes of E1 (total size: 4 bytes) Next Packet to finish is E1

20
20 Comnet 2010 GPS Simulation 2/5 1/5 14/15 A D E …21.4722.0723 T(E1) = 22 1/15 T(A3) = 23 4 3 4/5 2/3

21
21 Comnet 2010 WFQ Order of packets in GPS is: A1, C1, B1, A2, D1, E1, A3Order of packets in GPS is: A1, C1, B1, A2, D1, E1, A3 WFQ uses the same orderWFQ uses the same order Departure time is therefore: T(A1)=4 T(C1)=6 T(B1)=9 T(A2)=13 T(D1)=17 T(E1)=21 T(A3)=23Departure time is therefore: T(A1)=4 T(C1)=6 T(B1)=9 T(A2)=13 T(D1)=17 T(E1)=21 T(A3)=23 In WF 2 Q D1 departs before A2In WF 2 Q D1 departs before A2

22
22 Comnet 2010 Solution with Virtual Time For few events, we can use virtual time.For few events, we can use virtual time. Virtual time gives us WFQ order without calculating GPS time.Virtual time gives us WFQ order without calculating GPS time. In the example, we may ignore the events of a class getting empty, since it never refills.In the example, we may ignore the events of a class getting empty, since it never refills. V-depart = V-start + size/weightV-depart = V-start + size/weight

23
23 Comnet 2010 Virtual Time (cont) Virtual time of t=0 is Vt(0)=0Virtual time of t=0 is Vt(0)=0 Virtual time of t=1 is Vt(1)=1/3Virtual time of t=1 is Vt(1)=1/3 Virtual time of t=2 is Vt(2)=1/3+1/5=8/15Virtual time of t=2 is Vt(2)=1/3+1/5=8/15 Departure times:Departure times: –V(A1) = 0 + 4/2 = 2 –V(A2) = 2 + 4/2 = 4 –V(A3) = 4 + 2/2 = 5

24
24 Comnet 2010 Virtual Time (cont) Departure times (cont.)Departure times (cont.) –V(B1) = 0 + 3/1 = 3 –V(C1) = 1/3 + 2/1 = 2 1/3 –V(D1) = 1/3 + 4/1 = 4 1/3 –V(E1) = 8/15 + 4/1 = 4 8/15 Order is: A1, C1, B1, A2, D1, E1, A3Order is: A1, C1, B1, A2, D1, E1, A3

Similar presentations

Presentation is loading. Please wait....

OK

CS 268: Packet Scheduling Ion Stoica March 18/20, 2003.

CS 268: Packet Scheduling Ion Stoica March 18/20, 2003.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on bluetooth hacking app Ppt on neural control and coordination Ppt on first conditional activities Ppt on conservation of mass Ppt on market friendly state name Transparent lcd display ppt on tv Ppt on programmable logic controller Ppt on international financial markets Ppt on 4g lte Ppt on test tube baby