communication networks

16
1 Comnet 2006 Communication Networks Communication Networks Recitation 4 Recitation 4 Scheduling & Drop Scheduling & Drop Policies Policies

Upload: gannon

Post on 05-Jan-2016

18 views

Category:

Documents


0 download

DESCRIPTION

Communication Networks. Recitation 4 Scheduling & Drop Policies. Queueing Basics. A queue consists of a scheduling discipline and a drop policy. input. scheduling discipline: what packet gets sent next. drop policy: what is dropped upon overflow. queued packets. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Communication Networks

1Comnet 2006

Communication NetworksCommunication Networks

Recitation 4Recitation 4

Scheduling & Drop PoliciesScheduling & Drop Policies

Page 2: Communication Networks

2Comnet 2006

Queueing BasicsQueueing Basics

• A queue consists of a A queue consists of a scheduling scheduling disciplinediscipline and a and a drop policydrop policy

queued packets

schedulingdiscipline:what packetgets sent next

drop policy: what is dropped uponoverflow

input

Page 3: Communication Networks

3Comnet 2006

Generalized Processor SharingGeneralized Processor Sharing

• The ideal max-min fair scheduling scheme The ideal max-min fair scheduling scheme – Visit each non-empty queue in turn Visit each non-empty queue in turn – Serve infinitesimal from each Serve infinitesimal from each – GPS is not implementable; we can serve only GPS is not implementable; we can serve only

packets packets

Page 4: Communication Networks

4Comnet 2006

Weighted Fair QueueingWeighted Fair Queueing

Problem:Problem: We need to serve a whole packet at We need to serve a whole packet at a time.a time.

Solution:Solution: 1.1. Determine what time a packet, Determine what time a packet, pp, would , would

complete if we served flows by GPS. Call complete if we served flows by GPS. Call this the packet’s finish time, F(this the packet’s finish time, F(pp).).

2.2. Serve packets in the order of increasing Serve packets in the order of increasing finish time.finish time.

Page 5: Communication Networks

5Comnet 2006

WFQ Round -- Virtual TimeWFQ Round -- Virtual Time

• Round number is a real-valued variable Round number is a real-valued variable that increases at a rate inversely that increases at a rate inversely proportional to the number/weight of proportional to the number/weight of active connections active connections

• Updating the number of connections: Updating the number of connections: – A connection becomes active when a packet A connection becomes active when a packet

arrives to an empty queue arrives to an empty queue – A connection becomes inactive when R(A connection becomes inactive when R(tt) > F() > F(pp), ),

where where pp is the last packet served is the last packet served

Page 6: Communication Networks

6Comnet 2006

Virtual time ExampleVirtual time Example

A L=1 L=2

B L=2

C L=2

0

0.5

1

1.5

2

2.5

3

3.5

4

0 1 2 3 4 5 6 7 8real time

virt

ual t

ime

1/3

1/2

1/3

1

F1=1

F1=2

F1=2

F2=3.5

Page 7: Communication Networks

7Comnet 2006

Understanding bit by bit WFQ Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth4 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

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

A1B1C1D1

A2 = 2

C3 = 2

A1B1C2D2

C2 Departs at R=2Time

Round 1Round 2

Page 8: Communication Networks

8Comnet 2006

Understanding bit by bit WFQ Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth4 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

A1B1C1D1

A2 = 2

C3 = 2

A1B1C2D2

D2, B1 Depart at R=3

A1B1C3D2

Time

Round 1Round 2Round 3

Weights : 1:1:1:1

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 = 2 C1 = 1

C1D1C2B1B1B1D2D2A 1A1A 1A 1

A2 = 2

C3C3A2A2

Departure order for packet by packet WFQ: Sort by finish round of packetsTime

Sort packets

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

A1B1C2D2

A1 Depart at R=4

A1B1C3D2A1C3A2A2

Time

Round 1Round 2Round 3Round 4

C3,A2 Departs at R=6

56

Page 9: Communication Networks

9Comnet 2006

WF²Q WF²Q • Packet approximation algorithm of GPS.Packet approximation algorithm of GPS.

• Choosing the packet with the smallest finish Choosing the packet with the smallest finish time among all the packets that have time among all the packets that have already already started servicestarted service in the in the corresponding GPS emulation.corresponding GPS emulation.

• Almost identical to that of GPS, differing by Almost identical to that of GPS, differing by no more than one maximum size packet.no more than one maximum size packet.

Page 10: Communication Networks

10Comnet 2006

Page 11: Communication Networks

11Comnet 2006

Drop-tailDrop-tail

• Signals congestion only when the queue is Signals congestion only when the queue is already saturatedalready saturated

• Likely to drop more packets from the same flowLikely to drop more packets from the same flow

• Unfair with bursty flowsUnfair with bursty flows

m axQ = 6

Page 12: Communication Networks

12Comnet 2006

Random Early Detection (RED)Random Early Detection (RED)

avg(Q len)

P(drop)

100%

0

m axP

thm in thm ax

Page 13: Communication Networks

14Comnet 2006

Page 14: Communication Networks

15Comnet 2006

The Advantages of REDThe Advantages of RED• No bias against bursty trafficNo bias against bursty traffic

• No global synchronizationNo global synchronization

• Packet marking probability proportional Packet marking probability proportional to connection’s share of bandwidthto connection’s share of bandwidth

• Scalable: no per-connection stateScalable: no per-connection state

Page 15: Communication Networks

16Comnet 2006

Explicit Congestion Notification (ECN)Explicit Congestion Notification (ECN)

ReceiverSender

ReceiverSender

1234567

75421 6

1234567

75421 63

Packet Drops

ECN

Page 16: Communication Networks

17Comnet 2006

ECN DetailsECN Details

• Packets have a special Early Packets have a special Early Congestion Notification (ECN) bitCongestion Notification (ECN) bit

• The ECN bit is set to 1The ECN bit is set to 1• Receivers forward ECN bit state back to Receivers forward ECN bit state back to

sender in acknowledgmentssender in acknowledgments• Sender can adjust rate accordinglySender can adjust rate accordingly