View
232
Download
2
Tags:
Embed Size (px)
Citation preview
1
Algorithm Orals 2002
High PerformanceSwitching and RoutingTelecom Center Workshop: Sept 4, 1997.
Algorithm Qualifying Examination Orals
Achieving 100% Throughput in IQ/CIOQ Switches using Maximum Size and Maximal Matching Algorithms
Sundar IyerStanford University
[email protected]/~sundaes
Algorithm Orals 2002
2
Outline
Introduction
Part-I: Properties of Maximum Size Matching (MSM) in an IQ switch
Stability of critical MSM for any Bernoulli i.i.d. traffic Stability of MSM for Bernoulli i.i.d. uniform traffic
Part-II: Properties of Maximal Matching (MXM) in a CIOQ switch
A simple proof for stability
Algorithm Orals 2002
3
Simple Model of a Switch
Port 1, input Port 1, output
Port 2, input Port 2, output
Port 3, input Port 3, output
Port 4, input Port 4, output
R
R
R
R
R
R
R
R
Example: Output Queued Switch
Algorithm Orals 2002
4
Input Queued Switch Model
N N
1 1R
R
Example: Input Queued Switch with virtual output queues (VOQs)
Crossbar
R
R
Port 1, input
Port N, input
Port 1, output
Port 4, output
VOQs
Algorithm Orals 2002
5
Relation to a Graph Matching
2
3
1
2
3
1
1
1
0
0
1
42
0
0
5
1
2
3
1
2
3
2
3
1
2
3
1
2
3
1
2
3
1
VOQs
Algorithm Orals 2002
6
Classes of Scheduling Algorithms
Maximum Weight Matching (MWM)
Choose a matching which maximizes the weight of the matching
MWM gives 100% throughput
Maximum Size Matching (MSM)
Choose a matching which maximizes the size of the matching
Algorithm Orals 2002
7
Outline
Introduction
Part-I: Properties of Maximum Size Matching (MSM) in an IQ switch
Stability of critical MSM for any Bernoulli i.i.d. traffic Stability of MSM for Bernoulli i.i.d. uniform traffic
Part-II: Properties of Maximal Matching (MXM) in a CIOQ switch
A simple proof for stability
Algorithm Orals 2002
8
MSM is Unstable
N N
1 1
Request Graph
N N
1 1
N N
1 1
..
N N
1 1
Switch schedule based on MSM
T=1 T=2 ……….
Algorithm Orals 2002
9
Questions
Are all MSMs unstable?
Is there a subclass of MSMs which are stable? There is at least one MSM which is stable.
Are MSMs stable under uniform load?
Simulation seems to suggest this. Can we prove this?
Algorithm Orals 2002
10
Non Pre-emptive SchedulingBatch Scheduling
N N
1 1R
R
Priority-2
Crossbar
R
R
Port 1, input
Port N, input
Port 1, output
Port N, output
Priority-1
Batch-(k+1)
Batch-(k)
Algorithm Orals 2002
11
Non Pre-emptive SchedulingBatch Scheduling
N N
1 1R
R
Priority-2
Crossbar
R
R
Port 1, input
Port N, input
Port 1, output
Port N, output
Priority-1
Batch-(k+1)
Batch-(k)
Algorithm Orals 2002
12
Degree of a Batch
1
2
3
0
1
0
2
1
0
0
0
1
1
2
3
Batch Request GraphDegree (dv,k):
The number of cells departing from (destined to) a vertex in batch k.
Maximum Degree (Dk) The maximum degree
amongst all inputs/outputs in batch k.
Algorithm Orals 2002
13
Critical Maximum Size Matching
2
3
1
2
3
1
1
2
3
2
3
1
2
3
12
3
1
2
3
1
0
1
0
2
1
0
0
0
1
1
2
3
Batch Request Graph
degree =3 degree =3
Algorithm Orals 2002
14
Outline
Introduction
Part-I: Properties of Maximum Size Matching (MSM) in an IQ switch
Stability of Critical MSM for any Bernoulli i.i.d. traffic Stability of MSM for Bernoulli i.i.d. uniform traffic
Part-II: Properties of Maximal Matching (MXM) in a CIOQ switch
A Simple proof for stability
Algorithm Orals 2002
15
The Arrival Process
, :
1, 1
ij ij
ij iji j
A
1. Traffi c matrix:
where expected number of
arrivals in one timeslot
2. I f ; we say the traffi c is "admissible".
3. For a Bernoulli i.
, ( , );ij i jN
i.d arrival process:
I f we say the traffi c is unif orm.
Algorithm Orals 2002
16
Stability of CMSM
Theorem 1:
CMSM is stable under batch scheduling, if the input traffic is admissible and Bernoulli i.i.d. uniform
Informal Arguments: Let Tk be the time to schedule batch k
Then for batch k+1 we buffer packets for time Tk
We expect about Tk packets at every input/output
Hence, the maximum degree of batch k +1, i.e. Dk+1 Tk
Hence for a CMSM Tk+1 = Dk+1 = Tk < Tk
Hence Tk converges to a finite number
Algorithm Orals 2002
17
Formal Arguments … 1 We shall use the Chernoff bound to get
If we want to bound Dk, we require that all the 2N vertices are bounded
(1 ), 1{ (1 ) }
(1 )
kT
v k k veP d T p
1{ (1 ) } 1 2k k vP D T Np Q
Algorithm Orals 2002
18
We can choose (1 + ) < 1 - to get
Observe that Q is now a function of Tk only.
We can make Q as close to 1, by choosing a large Tk
Also, Tk+1 NTk
This gives
Formal Arguments … 2
1{ (1 ) }k kP T T Q
1( ) (1- ) (1- )
(1- ) , if .....
k k
k
kE T Q T Q NT
T
Algorithm Orals 2002
19
Formal Arguments …3
Hence, there is a constant Tc which depends only on (and hence only on ), such that
Formally, using a linear Lyapunov function V(Tk) = Tk, we can say that E(Tk) is bounded.
1( ) (1- ) , k k k cE T T T T
Algorithm Orals 2002
20
Stability of CMSM
Theorem 2:
CMSM is stable under batch scheduling, if the input traffic is admissible and Bernoulli i.i.d.
Algorithm Orals 2002
21
Outline
Introduction
Part-I: Properties of Maximum Size Matching (MSM) in an IQ switch
Stability of Critical MSM for any Bernoulli i.i.d. traffic Stability of MSM for Bernoulli i.i.d. uniform traffic
Part-II: Properties of Maximal Matching (MXM) in a CIOQ switch
A Simple proof for stability
Algorithm Orals 2002
22
Example of a Uniform Graph
2
3
1
2
3
1
1
2
3
2
3
1
2
3
12
3
1
2
3
1
1
1
1
1
1
1
1
1
1
1
2
3
Batch Request Graph
degree =3 degree =3
Algorithm Orals 2002
23
Properties of Uniform Graphs
Lemma-1:
If the request graph is uniform and the maximum degree is D, then any MSM can schedule the requests in exactly D time slots
Lemma-2:
Any request graph with maximum degree D, can be scheduled by any MSM within 2D time slots
Algorithm Orals 2002
24
Property of any Graph Theorem:
Any request graph with maximum degree is D, and minimum VOQ length m, can be scheduled in less than 2D –Nm time slots
Proof: Consider a request graph with minimum VOQ length m The minimum degree of the graph is mN Hence the original graph can be considered to be in two
parts
• A uniform graph of degree mN
• Another graph of maximum degree D – mN
Hence the request graph can be scheduled in at most mN + 2(D-mN) = 2D - Nm
Algorithm Orals 2002
25
Stability of MSM ..1
Theorem 3:
MSM is stable under batch scheduling, if the input traffic is admissible and Bernoulli i.i.d. uniform
Informal Arguments
We can bound both the maximum degree D and the minimum VOQ length m
The rest of the proof is similar to the CMSM proof
Algorithm Orals 2002
26
Outline
Introduction
Part-I: Properties of Maximum Size Matching (MSM) in an IQ switch
Stability of critical MSM for any Bernoulli i.i.d. traffic Stability of MSM for Bernoulli i.i.d. uniform traffic
Part-II: Properties of Maximal Matching (MXM) in a CIOQ switch
A simple proof for stability
Algorithm Orals 2002
27
Maximal Matching Algorithms
Maximal Matching (MXM)
Choose a matching such that no unmatched input or output has a packet meant for each other
They are easier to implement and have low complexity
They are known to be unstable and give low throughput for input queued switches
Algorithm Orals 2002
28
A Model for a CIOQ switch
Combined Input-Output Queued Switch
Bandwidth: 2NR
2R
2R
2R
Port 1
Port 2
Port N
2R
2R
2R
R
R
R
Port 1
Port 2
Port N
R
R
R
A CIOQ switch with a speedup of 2, gives 100% throughput for any MXM algorithm
• [Ref: Dai & Prabhakar, Leonardi. et. al.]
Algorithm Orals 2002
29
Let Aj(t1,t2) denote the number of arrivals to output j in the interval between (t1,t2)
A leaky bucket constrained traffic satisfies, the property that for each output j
Note that this means that for an ideal output queued switch no output has more than B packets in the switch
Let DT denote the departure time of a packet from this ‘ideal’ output queued switch
Leaky Bucket Traffic
1 2 2 1 j( , ) ( ) ; where α <1j jA t t t t B
Algorithm Orals 2002
30
Stability of MXM
Theorem 4:
A CIOQ switch with an MXM algorithm gives bounded delay and hence 100% throughput with a speedup greater than 2, under arrivals which satisfy the leaky bucket constraint
Algorithm Orals 2002
31
Constraint Set ‘Maximal’ Algorithm
The algorithm is greedy i.e. when a cell arrives, it immediately attempts to allot a time (in the future) when it should be transferred
Each input and output maintains a constraint set of the future times during which it is free to send/receive a packet
The algorithm attempts to bound the time of departure of a packet to within k time slots of its departure time DT, i.e each packet is transferred in the time (DT, DT+k)
Algorithm Orals 2002
32
Allocations as seen by the Output
…DT + k DT- kDT
ck
Packet has an OQ Departure Time = DT
Packet should leave in the interval (DT, DT + k)
In the interval (DT, DT + k) There is one cell which tries to get allotted in that interval. No more than k cells get delayed and are allotted to that interval
Number of Time Slots Available is more than k
kS
Algorithm Orals 2002
33
Allocations as seen by the Input
…DT + k DT-B-kDT
B + k
DT-B
Packet has an OQ Departure Time = DT
Packet should leave during interval (DT, DT + k)
In the interval (DT, DT + k) There is one cell which tries to get allotted in that interval No cell which arrived before DT–B-k will be allotted to this interval
Number of Time Slots Available is more than
ck
k Bk
S
Algorithm Orals 2002
34
Sufficiency Conditions on Speedup
We are guaranteed a timeslot if
The above equation can be satisfied if
This means S > 2 is sufficient to guarantee that the delay is bounded
This implies 100% throughput
k B kk k k
S S
2
Bk
S
Algorithm Orals 2002
35
Stability of MXM
Theorem 5:
A CIOQ switch with an MXM algorithm gives 100%throughput with a speedup greater than 2, under
admissiblearrivals which satisfy the strong law of large numbers
Algorithm Orals 2002
36
Summary
In an IQ switch with batch scheduling
A subclass of MSM called CMSM is stable, if the input traffic is admissible and Bernoulli i.i.d.
MSM is stable, if the input traffic is admissible and Bernoulli i.i.d. uniform
In a CIOQ switch with S>2,
MXM is stable under any traffic which satisfies the strong law of large numbers
Algorithm Orals 2002
37
Future Questions We have seen that MSM is stable under the
auspices of batch scheduling
Perhaps we could incorporate this (well known) idea into a number of other algorithms to prove stability?
It would be nice to nail down the stability of MSM with uniform load in the absence of batch scheduling
Other open questions remain
Algorithm Orals 2002
38
Backup
Algorithm Orals 2002
39
Stability of MSM …2 Informal Arguments:
Similar to the CMSM proof, derive P{D < (1 + 1) Tk }
Use Chernoff bound, to derive P{mN > (1 - 2) Tk}
We can now write the probability of using less than
2[(1 + 1) Tk] – (1 - 2) Tk = (1 + 21 + 2)Tk time slots
Then rest of the proof is similar to CMSM