scheduling crossbar switches
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 PresentationTRANSCRIPT
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 If
where
: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?
A
B
C
D
E
F
1
2
3
4
5
6
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
B
C
D
E
F
2
3
4
5
6
7
Network Flows
Sources
Sinkt
a c
b d
10
10
10
1
1
1
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
t
a c
b d
10
10
10
1
1
1
10
10
Step 1:
Sources
Sinkt
a c
b d
10, 10
10
10, 10
1
1
1
10
10, 10
Flow is of size 10
9
A maximum network flow example
Sources
Sinkt
a c
b d
10, 10
10, 1
10, 10
1
1
1, 1 10, 1
10, 10
Step 2:
Flow is of size 10+1 = 11
Sources
Sinkt
a c
b d
10, 10
10, 2
10, 9
1,1
1,1
1, 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 d
10, 10
10
10, 10
1
1
1
10
10, 10
Flow is of size 10
t
a c
b d
10
10
10
1
1
1
10
10
s
res(v,w) = cap(v,w) – f(v,w) Residual Graph, R
Augmenting path
12
Example of Residual Graph
s t
a c
b d
10, 10
10, 1
10, 10
1
1
1, 1 10, 1
10, 10
Step 2:
Flow is of size 10+1 = 11
s t
a c
b d
10
1
10
1
1
1
1
10
Residual 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?
A
B
C
D
E
F
1
2
3
4
5
6
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
B
C
D
E
F
2
3
4
5
6
16
Network flows and bipartite matchingFord-Fulkerson method
A 1
s t
B
C
D
E
F
2
3
4
5
6
Residual Graph for first three paths:
17
Network flows and bipartite matching
A 1
s t
B
C
D
E
F
2
3
4
5
6
Residual Graph for next two paths:
18
Network flows and bipartite matching
A 1
s t
B
C
D
E
F
2
3
4
5
6
Residual Graph for augmenting path:
19
Network flows and bipartite matching
A 1
s t
B
C
D
E
F
2
3
4
5
6
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
B
C
D
E
F
2
3
4
5
6
Maximum flow graph:
21
Network flows and bipartite matching
A 1
B
C
D
E
F
2
3
4
5
6
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 0
1 2 0 1( 1) ( 1) ( ) ( ) ( ) ( ) 2 ,
1 0 2 1
0 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 to
a match of the sam
I J
M M
M
ˆe size as . But Ford-Fulkerson never removes
matched inputs/ outputs when augmenting. But (f rom property above)
the augmented graph has greater LPF weight. Theref ore wasn't an
LPF 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?