Professional Documents
Culture Documents
Fundamental Principles of Packet Switch Design: IEG4020 Telecommunication Switching and Network Systems
Fundamental Principles of Packet Switch Design: IEG4020 Telecommunication Switching and Network Systems
Fundamental Principles of Packet Switch Design: IEG4020 Telecommunication Switching and Network Systems
Chapter 3
Fundamental Principles of Packet
Switch Design
Output destinations
are random
… 3 1 1 1
… 4 2 4
4x4 2
… 1 1
Switch
3
… 4 2 4
2
To Switch
Info Input
Disassembler Delay Assembler
( Output VCI )
Header Header
( Input VCI ) Processor
Input Output Output
VCI: virtual-circuit VCI Address VCI
identifier
Memory 1 5 2
2 12 5
. . .
. . .
3
VCI of a virtual channel may change from link to link
2 2
3
2
2 2
4
Packet Contention in Switches
Loss System :
o No input or internal buffers. Packets may need to
queue at outputs if group size is greater than 1
o Packets may be dropped internally or at outputs due
to contention. Loss probability can be made
arbitrarily small
Waiting System :
o Contention Resolution mechanism to select packets
to be switched
o Losing packets buffered at inputs or internally
o Output buffers needed if group size is greater than 1
o Throughput can be made arbitrarily close to 100%
5
Solutions for Packet Contention
1) Speeding up packet switching
1 1
Speedup factor ≥ 3
1 2
solve the
4x4
contention problem
1 3
in this example
2 4
One of these 1 1
packets must
1 2
be dropped if
4x4
group size = 2 1 3
2 4
7
Solutions for Packet Contention
3) Buffer Packets
Two of these 1 1
packets must
1 2
be buffered if
4x4
group size = 1 1 3
2 4
8
Fundamental properties of interconnection
networks
Interconnection Networks :
o Originally intended for multiprocessor computer
interconnect
o distributed, self-routing algorithms
o regular topological interconnection pattern
9
Banyan Networks
* Definition:
Not internally
nonblocking
* Unique path
from input
to output
* log2N stages
0 0 0 010
1 1 1 011
0 0
101 0 100
1 1 1 101
100
0 0 0 110
1 100 1 1 111
100
0 0 0 010
100 1 1 1 011
0 0 0 100
1 1 1 101
0 0 0 110
100 1 1 1 111
Internal Conflict
Ploss = n / (n+4)
0.6
0.5
0.4 λ=1
0.3
0.2
0.1
n = log2N
1 2 3 4 5 6 7
N
Can realize at most N input-output mappings without conflict
2
16
001 000
010 001
011 010
110 011
100
101
110
111
Fig. 3.8. (a) An example showing the banyan network is
nonblocking for sorted inputs
001 000
010 001
011 010
110 Sorting 011
Network 100
101
110
111
Fig. 3.8. (b) Nonblocking sort-banyan network
17
Subnetwork 0
Subnetwork 00
0000 0000
0001 000,Φ 00,0 0,00 Φ, 000 0001
0010 0010
001,Φ 01,0 1,00 Φ, 001
0011 0011
0100 0100
0101 010,Φ 10,0 0,01 Φ, 010 0101
0110 0110
011,Φ 11,0 1,01 Φ, 011
0111 0111
1000 1000
1001 100,Φ 00,1 0,10 Φ, 100 1001
1010 1010
101,Φ 01,1 1,10 Φ, 101
1011 1011
1100 1100
1101 110,Φ 10,1 0,11 Φ, 110 1101
1110 1110
111,Φ 11,1 1,11 Φ, 111
1111 1111
Subnetwork 1
Input
Stage-1
Node
Stage-2
Node … Stage-n
Node Output
19
Banyan Network – Routing Algorithm
Stage-1 Stage-2 Stage-3
Input Node Node Node
0 …
(an-2 …a1 ,0)
0
1 …
an …a1 (an-1 …a1 ,Φ)
0 …
1 (an-2 …a1 ,1)
1 …
Without collision, a packet with input an …a1 and output
b1 …bn will be in node an-k …a1, b1 …bk-1 at stage k
Stage k :
an-k …a1,
b1 …bk-1
20
Banyan Network – SNB Proof. ..
Proof : Two packets: x .
. .. y’
.
x’ .
1st packet : x = an…a1 y = b1…bn
2nd packet : x’ = an’…a1’ y’ = b1’…bn’ . .. y
collide in stage k
Then, an-k a1 an-k a1 and b1 bk b1 bk
x x an a1 an a1
2n k
y y b1 bn b1 bn
2n k 1 x x
21
Banyan Network – SNB Proof
between x’ and x x’ y’
They must have distinct outputs
2.) | y’ – y + 1 | >= number of distinct
outputs
= | x’ – x + 1 |
i.e. | y’ – y | >= | x’ – x |
22
Banyan Network with sorted input packets
111 000
110 001
010 010
101 011
001 100
011 101
100 110
000 111
23
011 000
110 001
010
011
100
101
001 110
010 111
(x1, y1) (x1 + Z mod N, y1)
.. nonblocking ..
(xm, ym) (xm + Z mod N, ym)
Fig. 3.11. Sorted packets remains unblocked after their inputs are
shifted (mod 8) by 6
24
Concentration :
RBN RBN
(shifted concentration)
25
3 1
4 2
1 3
2 4
Fig. 3.12. (a) Sorting network switches correctly when all inputs are active and have
no
common outputs
4 1
4
1
Fig. 3.12. (b) Sorting network switches incorrectly when some inputs are inactive
1 1
2 1
3 2
1 3
Fig. 3.12. (c) Sorting network switches incorrectly when some inputs have common outputs
26
Sorting Network
real packets
4 1
2 Sorting 2
1 Network 3
3 4 dummy packets
discarded at outputs
dummy packets with destinations
chosen to be nonconflicting
27
Comparator
ai min(ai, aj)
aj max(ai,
aj )
Fig. 3.14. (a) A comparator
ai min(ai, aj)
aj max(ai,
aj )
Fig. 3.14. (b) A compact way of representing a comparator
28
Structure of Sorting Network
a1 b1
a2 b2
a3 b3
a4 b4
Fig. 3.15. (a) A 4x4 sorting network -- Compact representation
a1 b1
a2 b2
a3 b3
a4 b4
stage stage stage
1 2 3
Fig. 3.15. (b) A 4x4 sorting network -- Full representation
29
Sorting Network vs Comparison Network
Order-preserving property
Comparison
Networks
Sorting
Networks
0-1 principle
30
Order-preserving Property :
Suppose a comparison network maps input sequence
a = < a1, …, aN > to output sequence b = < b1, …, bN >,
Then for any monotonically increasing function f( . ),
it maps f(a) = < f(a1), …, f(aN) > to f(b) = < f(b1), …, f(bN) >
( Basic idea: large numbers remain larger (no smaller) than small
numbers after mapping
→ Comparator states do not change)
Example : f( . )
2 3 3 1 2
4 4 + 2
1
3 3
3 2 2 1
2 3 4
31
x min(x, y)
y max(x, y)
x y f (x) f (y) and x y f (x) f (y)
for any monotonic function f
f (min(x , y)) if x y
ff ((yx)) f (min(x , y)) if x y
f(y) max(f(x), f(y))
ff ((yx)) f (max(x , y)) if x y
f (max(x , y)) if x y
32
ai ci = min(ai, aj)
aj cj = max(ai, aj)
Fig. 3.17. (a) The inputs and outputs of a comparator at stage d when input
sequence is a
Fig. 3.17. (b) The inputs and outputs of the same comparator when
input sequence is f(a)
33
< a1, …, aN >
.. Sorting
Network .. aj By contradiction,
assume ai < aj, but
. .. ai aj placed before ai
By order-preserving property
ai
f (x) 10 ifif xx ai
1
0 ai x
34
2-merger
..
..
2-merger
4-merger N/2-merger
. .
. … .
N-merger
.
2-merger
..
2-merger
4-merger N/2-merger
.
k/2
sorted
... .
numbers N-merger . k sorted
k/2 . numbers
sorted
numbers
2-merger = comparator
0 0 0 0
1 2-m 1 0 0
1 0 4-m 1 0
0 2-m 1 1 0
0 0 0 8-m 1
1 2-m 1 0 1
0 0 4-m 1 1
1 2-m 1 1 1
36
Ascending
Sequence
.. ..
k-bitonic
. Ascending
Descending
Sequence
.. sorter Sequence
or
Descending
Sequence
.. ..
k-bitonic
. Ascending
Ascending
Sequence
.. sorter Sequence
an min(an, a2n)
an+1 max(a1, an+1)
an+2 a”
... max(a2, an+2)
... bitonic
a2n max(an, a2n)
38
Half-cleaner - operations
Compare
0 0 Bitonic
Clean
0 1 0 1
1 0 0 1 Bitonic
0 Top Bottom Min Max 0
Compare
0 Bitonic
0
1 0 0 Clean
1 0 0 1
0 1 Bitonic
Top Bottom Min Max
39
Half-cleaner - operations
Compare
0 0 Bitonic
0 Clean
1 0 0
0 Bitonic
0 0
Top Bottom Min Max
Compare
0 0
Bitonic
0 1 0 0
1 1
1 0 0 Bitonic
1 Clean
0 Top Bottom Min Max
40
Examples of Bitonic Sequence (Circularly Bitonic) :
41
Physical picture of half-cleaner action on arbitrary-number
bitonic sequence :
Min Max
42
Bitonic Sorter
43
Bitonic Sorting Network
2-bitonic
sorter 4-bitonic
2-bitonic sorter
sorter 8-bitonic
2-bitonic sorter
sorter 4-bitonic
2-bitonic sorter
sorter
Fig. 3.24. (a) A sorting network based on merging using bitonic sorters
45
Odd-even Sorting Network - Proof
Proof that ei-2 di ei
n even
a a1 ,a3 , a a2 ,a4 ,
b b1 ,b3 , b b2 ,b4 ,
f (x) (nx , mx ) where nx #zeros in x , mx #ones in x
na ma nb mb
f (a ) ( , )
fb( ) ( , )
2 2 2 2
na ma nb mb
f (a ) ( , )
fb( ) ( , )
2 2 2 2
na nb ma mb
f (d ) ( , )
2 2 2 2
na nb ma mb
f (e) ( , )
2 2 2 2 46
Odd-even Sorting Network - Proof
a 00011111, na 3, ma 5;
b 00111111, nb 2, mb 6.
odd : a 0011, b 0111;
even : a 0111, b 0111.
n n
na a a
2 2
odd even
3 5
f (a) (2,2) ( , ) (2,2);
2 2
3 5
f (a) (1,3) ( , ) (1,3).
2 2
n n m m
f (d ) f (a) fb( ) a b , a b ;
2 2 2 2
n n m m
f (e) f (a) fb( ) a b , a b .
2 2 2 2 47
Odd-even Sorting Network - Proof
ei 2 di ei
There are at most three possible cases:
(1) nd ne ,
d1 d2 ...... di ......
0 0 ......0 1 1......1
0 ...... 0 0 1......11
e1 .... ei 2 ei 1 ei ...... ;
(2) nd ne 1,
d1 d2 ...... di ......
0 0 ......0 1 1......1
0 ...... 0 1 1......11
e1 .... ei 2 ei 1 ei ...... ; 48
Odd-even Sorting Network - Proof
(3) nd ne 2,
d1 d2 ...... di ......
0 0 ......0 1 1......1
0 ...0 1 1 1......11
e1 .... ei 2 ei 1 ei ...... .
Do not hold: nd ne 3,
d1 d2 ...... di ......
0 0 ......0 0 1......1
0 ...0 1 1 1......11
e1 .... ei 2 ei 1 ei ...... ;
49
Informatio Header
n bits …
0100 Comparator
… in bar state
1000
Order of arrival from right to left
…
010 0 Remain in bar state
… after first bit
100 0
…
01 00
Remain in bar state after
…
10 00 second bit
51
Batcher-banyan network - Complexity
i 1
2
N log2 N(log 2 N 1)
* # comparators
2 2
N log2 N
52
Three-phase scheme – stage 1
4 2
5 4
Output i 4
Destinations 4 4 Banyan
i = idle outputs i 5 Network
2 i
4 i
i i
Sorting
Network Sorted header. Each output
examines the output above
for possible conflict
53
Three-phase scheme – stage 2
2
4
4
4 Banyan
5 Network
i
i
i
Acknowledgement
path is reverse of
forward sorting path
Fig. 3.28. (b) Three-phase scheme for sort-banyan network
( Stage 2: acknowledgement of winning packets )
54
Three-phase scheme – stage 3
Concentrated and monotonic
output addresses
4 2
5 4
5
55
Nonblocking and Self-routing Properties
of Clos Networks
Packet switching with Clos networks :
o The Clos network — first studied by C. Clos in 1953
o Features :
— Rearrangeably non-blocking
[1]
B.G. Douglass and A.Y. Oruc, “On self-routing in Clos connection
networks”, IEEE Trans. On Commun., Vol. 41, No. 1, Jan 1993, pp.121-
124
56
Nonblocking Route Assignment
57
Address Numbering Scheme
s [s]q q × q s / q p × p d / q q × q [d]q d
0 0 0 0 0 0 0 0
..
1
..
1
0 .. .. 0 .. .. 0
1
.. ..
1
q 0 0 0 0 0 0 q
..
q+1
..
1
1 .. .. 1 .. .. 1 ..
1
..
q+1
.. .. .. .. ..
2q-1 q-1 q-1 p-1 p-1 q-1 q-1 2q-1
. . . . .
(p-1)q 0 0 0 0 0 0 (p-1)q
..
(p-1)q+1
..
1
p-1 .. .. q-1 .. .. p-1
1
.. (p-1)q+1
..
pq-1 q-1 q-1 p-1 p-1 q-1 q-1 pq-1
b
q=4
3 7 11
3
2 6 10
2
1 5 9
1
0 4 8
0 a
1 2 p=3
d = aq + b, 0 a p-1
0 b p-1
59
Nonblocking Route Assignment
di
Routing tag from si to di : ( f (si ,di ) , ,[di ]q )
q
si
Routing tag from di to si : ( f (si ,di ) , ,[si ]q )
q
60
A fundamental lemma :
Let x1, x2,…, xn be a strictly monotonic sequence of
integers and for all i, define
61
Proof :
Without loss of generality, assume that the sequence is
increasing and let i < j. We have
g(xi ) g(x j ) i lq j where l 1
62
Rank-based assignment algorithm :
Route assignment based on the “rank” of each connection
request
Let π= {(s1, d1),…,(sn, dn)} be monotonic. The assignment
[2]
K. Sezaki, Y. Tanaka and M. Akiyama, “N:1 Connection Switching
Networks Suited for Time Division Switching”, Computer Networks and
ISDN Systems, No. 20, 1990, pp. 383-389
63
Proof :
The sequences (s1,…, sn) and (d1,…, dn) are monotonic
Let
g1(si) = f (si, π(si)) = f (si, di) = [m + i]q
g2(di) = f (π-1(di), di) = f (si, di) = [m + i]q
64
An example : 1 3 5 6 9 11
π=
2 4 7 9 10 11
si 1 3 5 6 9 11
di 2 4 7 9 10 11
m+i 0 1 2 3 4 5
f (si, di) = [m + i]q 0 1 2 3 0 1
Routing tag (0,0,2) (1,1,0) (2,1,3) (3,2,1) (0,2,2) (1,2,3)
0 0 (0,0)
1 1 (0,1)
2 2 (0,2)
3 3 (0,3)
4 4 (1,0)
5 5 (1,1)
6 6 (1,2)
7 7 (1,3)
8 8 (2,0)
9 9 (2,1)
10 10 (2,2)
11 11 (2,3)
Fig. 3.31. Route assignment for π 65
Order preserving property :
si
mi ni
... ... ... ...
di
si < sj M di < dj
mj nj
sj dj
Fig. 3.32. Order is preserved in a middle-stage module M
r0(si) = α1(q0) + α0
r1 (si ) r0 (si ) / q0 r0 (si ) q
0
67
If N = q0q1…qn-1 , number of stages = 2n – 1
qi for 0 i n 1
The size of a stage-i module is
q2 n-2-i for n -1 i 2n 2
r0 si 1 ' q0 0
2 ' q1 1 q0 0
2 ' q1q0 1q0 0
3 ' q2 2 q1 1 q0 0
3 ' q2q1q0 2q1q0 1q0 0
...
n 1 i 1 n 1 i 1
In general, r0 (si ) i q j 0 and di i q j 0
i 1 j 0 i 1 j 0
68
Example :
Benes network: qi = 2 for all i
s 0 1 3
d 1 2 4
r 0 1 2
r 3 21 0 0000 0001 0010
d 3 2 1 0 0001 0010 0100
R =α0α1α2β3β2β1β0 0000001 1000010 0100100
s 4 7 8 10 12 13
d 6 9 10 12 14 15
r 3 4 5 6 7 8
r 0011 0100 0101 0110 0111 1000
d 0110 1001 1010 1100 1110 1111
R 1100110 0011001 1011010 0111100 1111110 0001111
69
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
70
General Clos-type Networks :
Clos Network
si bi ai ai bi q=3 xi ai p = 4 xi yi di
0 00 00 0 0 00 0
1 01 01
0
1 1 0 01 1
2 02 02 2 2 02 2
s 03 3 d
bi i xi i
q 3 10 0 10 3 q
4 11
10 0
1 1 11 4
5 12 2 12 5
ai si q 11 1 yi di q
12 1 2
6 20 13 3 0 20 6
7 21 1 2 21 7
8 22 2 22 8
20 0
9 30 21 1 0 30 9
10 31 22 2 2 1 3 31 10
11 32 23 3 2 32 11
Non-blocking if and only if ai = aj → xi ≠ xj
Routing tag for output xi yi : (xi, yi)
Fig. 3.35. An omega network 72
The Reverse Omega Network :
si ai bi p = 4 xi ai q=3 xi yi yi xi di
0 00 0 0 00 00 0
1 01 0 1 1
0
01 01 1
2 02 2 2 02 02 2
s 3 03 d
ai i yi i
q 3 10 0 10 3 q
4 11 1 1
0 10
11 4
5 12 2 12 5
bi si q 1 11 xi di q
2 1 12
6 20 0 3 13 20 6
7 21 2 1 21 7
8 22 2 22 8
0 20
9 30 0 1 21 30 9
10 31 3 1 2 2 22 31 10
11 32 2 3 23 32 11
Non-blocking if and only if ai = aj → xi ≠ xj
Routing tag for output yi xi : (xi, yi)
Fig. 3.36. A reverse omega network 73
Cascade combination :
Reverse Omega network Omega network
stage 1 2 3 4 5
0 00 0 0 00 00 00 00 0 0 00 0
1 01 0 1 1 01 01 01 01 1 1 0 01 1
2 02 2 2 0 02 02 02 02 0 2 2 02 2
3 03 03 3
3 10 0 10 10 0 10 3
4 11 1 1 11 11 1 1 11 4
5 12 2 0 10 12 12 10 0 2 12 5
1 11 11 1
2 1 12 12 1 2
6 20 0 3 13 20 20 13 3 0 20 6
7 21 2 1 21 21 1 2 21 7
8 22 2 22 22 2 22 8
0 20 20 0
9 30 0 1 21 30 30 21 1 0 30 9
10 31 3 1 2 2 22 31 31 22 2 2 1 3 31 10
11 32 2 3 23 32 32 23 3 2 32 11
.. ...
... ...
si
N inputs
... .. N outputs
.. di
75
Self-Routing Properties of Sort-Clos Network Problems :
Concentration required
Contention resolution
by the Three-phase
Algorithm [3]
[3]
J.Y. Hui and E. Arthurs, “A Broadband Switch for Integrated Transport”,
IEEE JSAC, Vol. SAC-5, No. 8, Oct. 1987, pp. 1264-1273 76
Multicast connections :
o Extension to broadcast Clos network
o Let the set of active inputs be (s0,s1,…,sn-1)
Let their corresponding sets of outputs be (D0,D1,…,Dn-1)
The set of connection requests is monotonic if
si s j di d j di Di and d j D j ; or
si s j di d j di Di and d j D j
77
An example :
si 2 3 4 5 8
Di 0,1 2,3,4 5,6 7,8,9 10,11
m+i 0 1 2 3 4
f (si, di) = [m + i]q 0 1 2 0 1
s s d d
0 00 00 0
1 01 01 1
2 02 02 2
3 10 10 3
4 11 11 4
5 12 12 5
6 20 20 6
7 21 21 7
8 22 22 8
9 30 30 9
10 31 31 10
11 32 32 11
78
Routing and replication :
o Routing from input to middle-stage modules by
decomposing the rank :
n 1 i 1
r0 (si ) i q j 0
i 1 j 0
79
General Interval Splitting Algorithm :
o Each packet is assigned an address interval represented
by minimum and maximum
o Suppose a node a stage i (n -1 i 2n - 2) receives a
packet with address interval specified by:
min (i-1) = mn-1 … m2n-2
max (i-1) = Mn-1 … M2n-2
80
General Interval Splitting Algorithm (continued) :
81
Header modifications :
stage-(i+1)
minimum unchanged
.. min(i) = min(i-1) = (mn-1 ,…,mi,mi+1 ,…,m2n-2)
..
..
j
.. min(i) = (mn-1 ,…, mi-1, j, 0, …, 0)
max(i) = (mn-1,…, mi-1, j, q(2n-2)-(i+1) -1,…,q0-1)
Mi
...
.. min(i) = (Mn-1 ,…, Mi, 0, …, 0)
max(i) = max(i-1) = (Mn-1,…,Mi,Mi+1,…,M2n-2)
maximum unchanged
82
An example :
s d
000 002 000
001 002 001
002 002
010
010 002 002 012 010
011 101 012 011
012 012
100 100
101 100
101
101 100
102 101 102
110 110
111 111
112 112
83
Decomposition and generalization :
Reverse Omega network Omega network
stage 0 1 2 3 4
00 0 0 00 00 00 00 0 0 00
01 0 1 1 01 01 01 01 1 1 0 01
02 2 2 0 02 02 02 02 0 2 2 02
3 03 03 3
10 0 10 10 0 10
11 1 1 11 11 1 1 11
12 2 0 10 12 12 10 0 2 12
1 11 11 1
2 1 12 12 1 2
20 0 3 13 20 20 13 3 0 20
21 2 1 21 21 1 2 21
22 2 22 22 2 22
0 20 20 0
30 0 1 21 30 30 21 1 0 30
31 3 1 2 2 22 31 31 22 2 2 1 3 31
32 2 3 23 32 32 23 3 2 32
84
Generalized copy network architectures :
Running Adder
Non-blocking copy
Network (RAN) Broadcast Trunk
network based on and Concentrator Banyan Number
broadcast banyan Dummy Address Network Network Translator
network Encoders (BBN) (TNT)
(DAE’s)
Running Adder
Non-blocking copy
Network (RAN) Trunk
network based on Broadcast
and Number
broadcast Clos Dummy Address
Clos Translator
network Encoders Network (TNT)
(DAE’s)
85
Conclusions :
o The principle governing the non-blocking and self-routing
properties of a large class of interconnection networks
o Non-blocking and self-routing properties of Clos networks
o Construction of a general Clos-type network by cascade
combination of any MIN and its reverse network
o Extension to multicast network based on broadcast Clos
network
86
~END~