scheduling for communication and processing networks jean walrand eecs university of california,...

58
Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling and Congestion Control for Communication and Processing Networks. Morgan-

Upload: debra-heath

Post on 26-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Scheduling for Communication and Processing Networks

Jean WalrandEECS

University of California, Berkeley

CORNELL, 4/25/2011

Ref: Jiang-Walrand: Scheduling and Congestion Control for Communication and Processing Networks. Morgan-Claypool 2010

Page 2: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

Page 3: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

Page 4: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

Page 5: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

How to schedule transmissions?How many active nodes?

Hard to organize.

Answer: Try at random!

Norman Abramson

Page 6: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

Backoff timers;Random initial value

Freeze timer whenchannel is busy

Transmit when timerruns out

Page 7: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

Backoff timers;Random initial value

Freeze timer whenchannel is busy

Transmit when timerruns out

Page 8: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

This scheme is called CSMA

Carrier Sense Multiple Access

Page 9: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

Collisions are possible:

When initial timer valuesare very similar.

Page 10: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

To reduce chances ofcollision:

When retransmittinga packet, nodes

select initial value of timer in a range that is

twice as wide.

Page 11: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

This scheme is called

Exponential Backoff

Thus, WiFi usesCSMA with

Exponential Backoff

Metcalfe &Boggs

Page 12: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

WiFi Network

CSMA with Exponential Backoffworks pretty well.

About 50% efficient…

Most users are happy.

Page 13: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Ad Hoc Network

Why not transmitdirectly?

More efficient(parallel transmissions,

lower power,…)

Multi-hop to reach destination.

If no infrastructure.

Page 14: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Ad Hoc NetworkHow to schedule transmissions?

WiFi scheme?

Very unfair to nodes with many neighbors.

Page 15: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Ad Hoc NetworkHow to schedule transmissions?

WiFi scheme?

Very unfair to nodes with many neighbors.

Page 16: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Ad Hoc NetworkHow to schedule transmissions?

WiFi scheme?

Very unfair to nodes with many neighbors.

Also, oblivious to requirementsof the different nodes.

Page 17: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Adaptive CSMA

Replace Exponential Backoff by Queue-Based Backoff

Libin Jiang

Page 18: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Adaptive CSMA

A node with a bigger backlog should choose its random backoff in a smaller range.

Stuff to send

Backoff timers

Page 19: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Adaptive CSMA

The node with a bigger backlog will get a higher throughput.

Page 20: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Adaptive CSMA

Adjust R so that the link transmits fast enough.

Let R = 1/(average timer value) = rate of transmission attempts

Backlog increases increase R.Backlog decreases decrease R.

R1

R3

R2

Page 21: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Adaptive CSMA

Adjust R so that the link transmits fast enough.

Let R = 1/(average timer value) = rate of transmission attempts

Backlog increases increase R.Backlog decreases decrease R.

R1

R3

R2

Page 22: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Adaptive CSMA

How to choose the values of R?

Do we need to know all the backlogs?

Could some nodes starve other nodes?

Can such a scheme be efficient and fair?

No

No

Yes

R = Exp{a.Backlog}

Page 23: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Dual AlgorithmComplex Problem: Congestion ControlSimple Solution: TCP: AIMD

Max Sj Uj(xj) s.t. Rate on link k < Ck

Dual algorithm Local Solution

- Each link k posts a price rk ≈ its backlog- Each user j chooses xj to maximize utility - price

Uj(xj) – Skrk1{j uses k}

Frank Kelly

Page 24: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Dual Algorithm

Much subsequent work; backpressure protocols (see references)

Related idea: Maximize drift of Lyapunov function (see references)

Page 25: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Dual Algorithm

Complex Problem: Scheduling Conflicting LinksSimple Solution: MWM (Maximum Weighted Matching)

Page 26: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

MWM

At any time, the links in the maximal independent set with the largest sum of queue lengths transmit.

Conflicting nodes: At any time, either {2} or {1, 3} can transmit. Maximal Independent Sets.

1

2

3

or

Page 27: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

MWM

At any time, the links in the maximal independent set with the largest sum of queue lengths transmit.

Two problems:1) Finding out the backlogs of other nodes;2) Finding the independent set with maximum

sum.

Property: Stabilizes the queues. [Tassiulas, Ephremides 92]

Page 28: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Dual AlgorithmComplex Problem: Random AccessSimple Solution: Adaptive CSMA

Max H(p(R)) s.t. sj > lj

Service rate at node j

Entropy of distribution of independent setsDual Algorithm Local Solution

Rj updated based on backlog of j

Rj ≈ Exp{aXj}

Page 29: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Example

Network

Queue Lengths

Time

λ = 0.98*(convex combination of maximal independent sets)

0.2*{1, 3} + 0.3*{1, 4, 6} + 0.3*{3, 5} + 0*{2, 4} + 0.2*{2, 5}

Page 30: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Congestion Control + Scheduling

• Links want to maximize the “total utility”

u1(λ1) + u2(λ2) + u3(λ3)

• Congestion control + scheduling

[Adjust arrival rates]

Page 31: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Congestion Control + SchedulingNode i maximizes

Page 32: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

•Approach: Q-CSMA + input rate control

•Fact: (Essentially) achieves maximum utility

Congestion Control + Scheduling

Node i maximizes

Page 33: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Congestion Control + Scheduling + Routing

Wireless links, with interference

(Here, assume that transmitters interfere with each other via carrier sensing.)

Goal: maximize total utility of flows

Congestion control, scheduling, and routing

Page 34: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Node [1]:

If (9 - 5)C(g) > (9 - 3)C(b): [1] -> [3]; Else: [1] -> [2]

Let b[1] = max{(9 - 5)C(g), (9 - 3)C(b)}

Let T[1] be exponentially distributed with rate Exp{ αb[1] }

[1] [2]

[3]

Node [2]:

If (8 - 4)C(d) > (3 - 0)C(c): (d); Else: (c)

Let b[2] = max{(8 - 4)C(d), (3 - 0)C(c)}

Let T[2] be exponentially distributed with rate Exp{ αb[2] }

Congestion Control + Scheduling + Routing

Page 35: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

[1] [2]

[3]

Then, use CSMA with those backoff delays.

Also, A chooses x that maximizes UA(x) - β10x;

B chooses y s.t....

Fact: (Essentially) achieves maximum utility

Congestion Control + Scheduling + Routing

Page 36: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Multipath routing allowed

Unicast S2 -> D2Anycast S1 to any D1

Congestion Control + Scheduling + Routing

Page 37: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Summary

• Each node:

• Adjusts incoming rate: maximize u(λ) - λβX

• Calculates, for every flowbackpressure = link rate * (trans. Q - receiver Q)

• Chooses flow with max. backpressure B

• Generates backoff with mean = 1/exp{αB}

• Then uses CSMA

• Fact: (Essentially) maximizes sum of utilities

Page 38: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

StatusCompatibility with TCPB: Using max S(log(1 + x)) [Srikant]

Reduce Delays: B+: Placeholder packets, virtual arrivals

Routing: C+: Avoid long paths

CollisionsWithout hidden nodes: A: [Srikant et al., LJ-JW]With hidden nodes: B: Using RTS/CTS; [Kim et al.]

Unreliable links: A

Changing links: C

Multicast, Unicast: A

Implementations: Promising examples (Rhee, Chiang, …)

Page 39: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Page 40: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

Page 41: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 0

Page 42: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 1-

Page 43: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 1

Page 44: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 2-

Page 45: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 2

Page 46: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 3-

Maximum Weighted Matching is not stable.

Page 47: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

DWM: Use MWM based on Virtual Queues

Page 48: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 0-

DWM: Use MWM based on Virtual Queues

Page 49: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 0

DWM: Use MWM based on Virtual Queues

Page 50: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 1-

DWM: Use MWM based on Virtual Queues

Page 51: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 1

DWM: Use MWM based on Virtual Queues

Page 52: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 2-

DWM: Use MWM based on Virtual Queues

Page 53: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 2

DWM: Use MWM based on Virtual Queues

Page 54: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Processing Networks

Task: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 3-

DWM: Use MWM based on Virtual Queues

Deficit Maximum Weighted Matching is stable.[Proof: Lyapunov argument.]

Page 55: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

Conclusions

Adaptive-CSMA is throughput optimal

Delays: Not perfect, but can be improved

Extends to congestion control and routing

Key idea: Maximize entropy

Approach applies to other distributed allocation problems:

Power allocation

Peer selection

VCG auctions

Processing Networks: MWM DWM

Page 56: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

ReferencesCSMA & Product-Form

R.R. Boorstyn et al, 1987

X. Wang & K. Kar, 2005

S. Liew et al., 2007

MWM

Tassiulas & Ephremides, 1992

Primal-Dual Decomposition of NUM

Kelly et al., 1998, Low-Lapsley, Low-Tang, …

Chiang-Low-Calderbank-Doyle, 2007

Backpressure Protocols + NUM

Lin & Shroff, 2004

Neely-Modiano-Li; Eryilmaz-Srikant; Stolyar 2005

Page 57: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

References

Adaptive-CSMA

Jiang-Walrand 2008/09, Shah, Proutiere, Chiang, …

Improvements of Adaptive-CSMA

Ni-Tan-Srikant 2009, Jiang-Ni-Leconte-Srikant-JW 2010

Adaptive-CSMA with collisions

Ni-Srikant; Jiang-Walrand; Liu et al. 2009

Implementations

Warrier-Ha-Wason-Rhee, 2008*

Lee-Lee-Yi-Chong-Proutiere-Chiang, 2009

Page 58: Scheduling for Communication and Processing Networks Jean Walrand EECS University of California, Berkeley CORNELL, 4/25/2011 Ref: Jiang-Walrand: Scheduling

Walrand - 4/2011

ReferencesMonographs

Jiang-Walrand. Scheduling and Congestion Control for Wireless and Processing Networks. Morgan-Claypool 2010.

Neely. Stochastic Network Optimization with Application to Communication and Queueing Systems. Morgan Claypool 2010.

Pantelidou-Ephremides. Scheduling in Wireless Networks. NOW, 2011