Scheduling Crossbar Switches
description
Transcript of Scheduling Crossbar Switches
1
Scheduling Crossbar Switches
Who do we chose to traverse the switch in the next time slot?
N N
1 1
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
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)
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)
5
Finding a maximum size match
How do we find the maximum size (weight) match?
ABCDEF
123456
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
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
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
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
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.
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
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
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)
14
Finding a maximum size match
How do we find the maximum size (weight) match?
ABCDEF
123456
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
16
Network flows and bipartite matchingFord-Fulkerson method
A 1
s t
BCDEF
23456
Residual Graph for first three paths:
17
Network flows and bipartite matching
A 1
s t
BCDEF
23456
Residual Graph for next two paths:
18
Network flows and bipartite matching
A 1
s t
BCDEF
23456
Residual Graph for augmenting path:
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.
20
Network flows and bipartite matching
A 1
s t
BCDEF
23456
Maximum flow graph:
21
Network flows and bipartite matching
A 1BCDEF
23456
Maximum Size Matching:
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.
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
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
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?