scheduling crossbar switches

25
1 Scheduling Crossbar Switches Who do we chose to traverse the switch in the next time slot? N N 1 1

Upload: kathie

Post on 18-Feb-2016

18 views

Category:

Documents


0 download

DESCRIPTION

Scheduling Crossbar Switches . Who do we chose to traverse the switch in the next time slot?. 1. 1. N. N. History. [Karol et al. 1987] Throughput limited to by head-of-line blocking for Bernoulli IID uniform traffic. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Scheduling Crossbar Switches

1

Scheduling Crossbar Switches

Who do we chose to traverse the switch in the next time slot?

N N

1 1

Page 2: Scheduling Crossbar Switches

2

History1. [Karol et al. 1987] Throughput limited to by

head-of-line blocking for Bernoulli IID uniform traffic.

2. [Tamir 1989] Observed that with “Virtual Output Queues” (VOQs) Head-of-Line blocking is reduced and throughput goes up.

%5822

Page 3: Scheduling Crossbar Switches

3

Basic Switch Model

A1(n)

S(n)

N NLNN(n)

A1N(n)

A11(n)L11(n)

1 1

AN(n)

ANN(n)

AN1(n)

D1(n)

DN(n)

Page 4: Scheduling Crossbar Switches

4

Some definitions

matrix. npermutatio a is and :where :matrix Service 2.

".admissible" is traffic the say we Ifwhere

:matrix Traffic 1.

SssS

nAE

ijij

jij

iij

ijijij

1,0],[

1,1

)]([:,

3. Queue occupancies:

Occupancy

L11(n) LNN(n)

Page 5: Scheduling Crossbar Switches

5

Finding a maximum size match

How do we find the maximum size (weight) match?

ABCDEF

123456

Page 6: Scheduling Crossbar Switches

6

Network flows and bipartite matching

Finding a maximum size bipartite matching is equivalent to solving a network flow problem with

capacities and flows of size 1.

A 1

Sources

Sinkt

BCDEF

23456

Page 7: Scheduling Crossbar Switches

7

Network FlowsSource

sSink

ta c

b d

10

10

101

11

10

10

• Let G = [V,E] be a directed graph with capacity cap(v,w) on edge [v,w].

• A flow is an (integer) function, f, that is chosen for each edge so that

• We wish to maximize the flow allocation.( , ), .( ) capf vv ww

Page 8: Scheduling Crossbar Switches

8

A maximum network flow example

By inspectionSource

sSink

ta c

b d

10

10

101

11

10

10

Step 1: Source

sSink

ta c

b d10, 1010

10, 101

11

10

10, 10

Flow is of size 10

Page 9: Scheduling Crossbar Switches

9

A maximum network flow example

Sources

Sinkt

a c

b d10, 1010, 1

10, 101

11, 1 10, 1

10, 10Step 2:

Flow is of size 10+1 = 11

Sources

Sinkt

a c

b d10, 1010, 2

10, 91,1

1,11, 1 10, 2

10, 10

Maximum flow:

Flow is of size 10+2 = 12

Not obvious

Page 10: Scheduling Crossbar Switches

10

Ford-Fulkerson method of augmenting paths

1. Set f(v,w) = -f(w,v) on all edges.2. Define a Residual Graph, R, in which

res(v,w) = cap(v,w) – f(v,w)3. Find paths from s to t for which there is

positive residue.4. Increase the flow along the paths to

augment them by the minimum residue along the path.

5. Keep augmenting paths until there are no more to augment.

Page 11: Scheduling Crossbar Switches

11

Example of Residual Graph

s t

a c

b d10, 1010

10, 101

11

10

10, 10

Flow is of size 10

t

a c

b d

10

10

101

11

10

10s

res(v,w) = cap(v,w) – f(v,w) Residual Graph, R

Augmenting path

Page 12: Scheduling Crossbar Switches

12

Example of Residual Graph

s ta c

b d10, 1010, 1

10, 101

11, 1 10, 1

10, 10Step 2:

Flow is of size 10+1 = 11

s ta c

b d

10

1

101

11

1

10Residual Graph

9 9

Page 13: Scheduling Crossbar Switches

13

Complexity of network flow problems

In general, it is possible to find a solution by considering at most VE paths, by picking shortest augmenting path first.

There are many variations, such as picking most augmenting path first.

Best Algorithm based on work by Dinic. Complexity: O(n m)

Page 14: Scheduling Crossbar Switches

14

Finding a maximum size match

How do we find the maximum size (weight) match?

ABCDEF

123456

Page 15: Scheduling Crossbar Switches

15

Network flows and bipartite matching

Finding a maximum size bipartite matching is equivalent to solving a network flow problem with

capacities and flows of size 1.

A 1

Sources

Sinkt

BCDEF

23456

Page 16: Scheduling Crossbar Switches

16

Network flows and bipartite matchingFord-Fulkerson method

A 1

s t

BCDEF

23456

Residual Graph for first three paths:

Page 17: Scheduling Crossbar Switches

17

Network flows and bipartite matching

A 1

s t

BCDEF

23456

Residual Graph for next two paths:

Page 18: Scheduling Crossbar Switches

18

Network flows and bipartite matching

A 1

s t

BCDEF

23456

Residual Graph for augmenting path:

Page 19: Scheduling Crossbar Switches

19

Network flows and bipartite matching

A 1

s t

BCDEF

23456

Residual Graph for last augmenting path:

Note that the path augments the match: no input and outputis removed from the match during the augmenting step.

Page 20: Scheduling Crossbar Switches

20

Network flows and bipartite matching

A 1

s t

BCDEF

23456

Maximum flow graph:

Page 21: Scheduling Crossbar Switches

21

Network flows and bipartite matching

A 1BCDEF

23456

Maximum Size Matching:

Page 22: Scheduling Crossbar Switches

22

Complexity of Maximum Matchings

Maximum Size Matchings: Algorithm by Dinic (~1970) O(n1/2m)

Maximum Weight Matchings (assignment problem) Algorithm by Kuhn (1955) O(N3)

In general: Hard to implement in hardware Slooooow.

Page 23: Scheduling Crossbar Switches

23

Another algorithm:Longest Port First (LPF)

( ) ( ), ( ) 0( ) , ( ) ( ), ( ) ( ).

0,

LPF algorithm fi nds maximum weight matching, where weight: if else.

Give pref erence to edges that clear backlog at inputs a

j i ijij j ij i ij

i j

C n R n L nw n C n L n R n L n

I ntuition:

2

[ ( )]

2 1 1 01 2 0 1

( 1) ( 1) ( ) ( ) ( ) ( ) 2 ,1 0 2 10 1 1 2

nd outputs.

I t can be shown that f or LPF, [Mekkittikul]. Method:

where

ij

ijij

E L n

E L n TL n L n TL n L n L n N T

Page 24: Scheduling Crossbar Switches

24

LPF

( ) ( ) ( ) ( ),

max max .I nteresting property of an LPF Match:

Proof (contradiction):1. Property: The weight of the match

where

ij ij i jij i I j J

S n w n R n C n

A imum weight LPF match is also a imum size match

,

ˆ .

are the set of matched inputs and outputs.2. Assume LPF Match is , and is smaller than maximum size match, Start the Ford-Fulkerson algorithm with . I t can be augmented toa match of the sam

I J

M MM

ˆe size as . But Ford-Fulkerson never removesmatched inputs/ outputs when augmenting. But (f rom property above)the augmented graph has greater LPF weight. Therefore wasn't anLPF match.

M

M

Page 25: Scheduling Crossbar Switches

25

Properties of LPF

LPF is stable for all admissible Bernoulli traffic.

An LPF match is a maximum size match. How can this be stable?