<s>
A	O
butterfly	B-Architecture
network	I-Architecture
is	O
a	O
technique	O
to	O
link	O
multiple	O
computers	O
into	O
a	O
high-speed	O
network	O
.	O
</s>
<s>
This	O
form	O
of	O
multistage	B-Operating_System
interconnection	I-Operating_System
network	I-Operating_System
topology	B-Architecture
can	O
be	O
used	O
to	O
connect	O
different	O
nodes	B-Protocol
in	O
a	O
multiprocessor	B-Operating_System
system	O
.	O
</s>
<s>
The	O
interconnect	B-General_Concept
network	O
for	O
a	O
shared	B-Operating_System
memory	I-Operating_System
multiprocessor	B-Operating_System
system	O
must	O
have	O
low	O
latency	O
and	O
high	O
bandwidth	O
unlike	O
other	O
network	O
systems	O
,	O
like	O
local	B-General_Concept
area	I-General_Concept
networks	I-General_Concept
(	O
LANs	B-General_Concept
)	O
or	O
internet	O
for	O
three	O
reasons	O
:	O
</s>
<s>
Messages	O
are	O
relatively	O
short	O
as	O
most	O
messages	O
are	O
coherence	B-Operating_System
protocol	I-Operating_System
requests	O
and	O
responses	O
without	O
data	O
.	O
</s>
<s>
Read/write	O
misses	O
occur	O
when	O
the	O
requested	O
data	O
is	O
not	O
in	O
the	O
processor	O
's	O
cache	B-General_Concept
and	O
must	O
be	O
fetched	O
either	O
from	O
memory	O
or	O
from	O
another	O
processor	O
's	O
cache	B-General_Concept
.	O
</s>
<s>
The	O
major	O
components	O
of	O
an	O
interconnect	B-General_Concept
network	O
are	O
:	O
</s>
<s>
Processor	O
nodes	B-Protocol
,	O
which	O
consist	O
of	O
one	O
or	O
more	O
processors	O
along	O
with	O
their	O
caches	B-General_Concept
,	O
memories	O
and	O
communication	O
assist	O
.	O
</s>
<s>
Switching	O
nodes	B-Protocol
(	O
Router	B-Protocol
)	O
,	O
which	O
connect	O
communication	O
assist	O
of	O
different	O
processor	O
nodes	B-Protocol
in	O
a	O
system	O
.	O
</s>
<s>
In	O
multistage	O
topologies	B-Architecture
,	O
higher	O
level	O
switching	O
nodes	B-Protocol
connect	O
to	O
lower	O
level	O
switching	O
nodes	B-Protocol
as	O
shown	O
in	O
figure	O
1	O
,	O
where	O
switching	O
nodes	B-Protocol
in	O
rank	O
0	O
connect	O
to	O
processor	O
nodes	B-Protocol
directly	O
while	O
switching	O
nodes	B-Protocol
in	O
rank	O
1	O
connect	O
to	O
switching	O
nodes	B-Protocol
in	O
rank	O
0	O
.	O
</s>
<s>
Links	O
,	O
which	O
are	O
physical	O
wires	O
between	O
two	O
switching	O
nodes	B-Protocol
.	O
</s>
<s>
These	O
multistage	O
networks	O
have	O
lower	O
cost	O
than	O
a	O
cross	O
bar	O
,	O
but	O
obtain	O
lower	O
contention	O
than	O
a	O
bus	B-General_Concept
.	O
</s>
<s>
The	O
ratio	O
of	O
switching	O
nodes	B-Protocol
to	O
processor	O
nodes	B-Protocol
is	O
greater	O
than	O
one	O
in	O
a	O
butterfly	B-Architecture
network	I-Architecture
.	O
</s>
<s>
Such	O
topology	B-Architecture
,	O
where	O
the	O
ratio	O
of	O
switching	O
nodes	B-Protocol
to	O
processor	O
nodes	B-Protocol
is	O
greater	O
than	O
one	O
,	O
is	O
called	O
an	O
indirect	O
topology	B-Architecture
.	O
</s>
<s>
The	O
network	O
derives	O
its	O
name	O
from	O
connections	O
between	O
nodes	B-Protocol
in	O
two	O
adjacent	O
ranks	O
(	O
as	O
shown	O
in	O
figure	O
1	O
)	O
,	O
which	O
resembles	O
a	O
butterfly	B-Application
.	O
</s>
<s>
Merging	O
top	O
and	O
bottom	O
ranks	O
into	O
a	O
single	O
rank	O
,	O
creates	O
a	O
Wrapped	O
Butterfly	B-Architecture
Network	I-Architecture
.	O
</s>
<s>
In	O
figure	O
1	O
,	O
if	O
rank	O
3	O
nodes	B-Protocol
are	O
connected	O
back	O
to	O
respective	O
rank	O
0	O
nodes	B-Protocol
,	O
then	O
it	O
becomes	O
a	O
wrapped	O
butterfly	B-Architecture
network	I-Architecture
.	O
</s>
<s>
BBN	B-Device
Butterfly	I-Device
,	O
a	O
massive	O
parallel	B-Operating_System
computer	I-Operating_System
built	O
by	O
Bolt	O
,	O
Beranek	O
and	O
Newman	O
in	O
the	O
1980s	O
,	O
used	O
a	O
butterfly	B-Application
interconnect	B-General_Concept
network	O
.	O
</s>
<s>
Later	O
in	O
1990	O
,	O
Cray	O
Research	O
's	O
machine	O
Cray	B-Device
C90	I-Device
,	O
used	O
a	O
butterfly	B-Architecture
network	I-Architecture
to	O
communicate	O
between	O
its	O
16	O
processors	O
and	O
1024	O
memory	O
banks	O
.	O
</s>
<s>
For	O
a	O
butterfly	B-Architecture
network	I-Architecture
with	O
p	O
processor	O
nodes	B-Protocol
,	O
there	O
need	O
to	O
be	O
p( log2	O
p	O
+	O
1	O
)	O
switching	O
nodes	B-Protocol
.	O
</s>
<s>
Figure	O
1	O
shows	O
a	O
network	O
with	O
8	O
processor	O
nodes	B-Protocol
,	O
which	O
implies	O
32	O
switching	O
nodes	B-Protocol
.	O
</s>
<s>
As	O
a	O
result	O
,	O
the	O
nodes	B-Protocol
connected	O
to	O
N(1,6 )	O
are	O
:	O
</s>
<s>
Thus	O
,	O
N(0,6 )	O
,	O
N(1,6 )	O
,	O
N(0,2 )	O
,	O
N(1,2 )	O
form	O
a	O
butterfly	B-Application
pattern	O
.	O
</s>
<s>
Several	O
butterfly	B-Application
patterns	O
exist	O
in	O
the	O
figure	O
and	O
therefore	O
,	O
this	O
network	O
is	O
called	O
a	O
Butterfly	B-Architecture
Network	I-Architecture
.	O
</s>
<s>
In	O
a	O
wrapped	O
butterfly	B-Architecture
network	I-Architecture
(	O
which	O
means	O
rank	O
0	O
gets	O
merged	O
with	O
rank	O
3	O
)	O
,	O
a	O
message	O
is	O
sent	O
from	O
processor	O
5	O
to	O
processor	O
2	O
.	O
</s>
<s>
In	O
figure	O
2	O
,	O
this	O
is	O
shown	O
by	O
replicating	O
the	O
processor	O
nodes	B-Protocol
below	O
rank	O
3	O
.	O
</s>
<s>
The	O
packet	B-Protocol
transmitted	O
over	O
the	O
link	O
follows	O
the	O
form	O
:	O
</s>
<s>
The	O
header	B-General_Concept
contains	O
the	O
destination	O
of	O
the	O
message	O
,	O
which	O
is	O
processor	O
2	O
(	O
010	O
in	O
binary	O
)	O
.	O
</s>
<s>
The	O
payload	O
is	O
the	O
message	O
,	O
M	O
and	O
trailer	B-Device
contains	O
checksum	B-Algorithm
.	O
</s>
<s>
Subsequently	O
,	O
this	O
bit	O
is	O
removed	O
from	O
the	O
destination	O
address	O
in	O
the	O
packet	B-Protocol
transmitted	O
through	O
the	O
selected	O
link	O
.	O
</s>
<s>
The	O
above	O
packet	B-Protocol
reaches	O
N(0,5 )	O
.	O
</s>
<s>
From	O
the	O
header	B-General_Concept
of	O
the	O
packet	B-Protocol
it	O
removes	O
the	O
leftmost	O
bit	O
to	O
decide	O
the	O
direction	O
.	O
</s>
<s>
The	O
new	O
header	B-General_Concept
is	O
'	O
10	O
 '	O
.	O
</s>
<s>
The	O
new	O
packet	B-Protocol
reaches	O
N(1,1 )	O
.	O
</s>
<s>
From	O
the	O
header	B-General_Concept
of	O
the	O
packet	B-Protocol
it	O
removes	O
the	O
leftmost	O
bit	O
to	O
decide	O
the	O
direction	O
.	O
</s>
<s>
The	O
new	O
header	B-General_Concept
is	O
'	O
0	O
 '	O
.	O
</s>
<s>
The	O
new	O
packet	B-Protocol
reaches	O
N(2,3 )	O
.	O
</s>
<s>
From	O
the	O
header	B-General_Concept
of	O
the	O
packet	B-Protocol
it	O
removes	O
the	O
leftmost	O
bit	O
to	O
decide	O
the	O
direction	O
.	O
</s>
<s>
The	O
header	B-General_Concept
field	O
is	O
empty	O
.	O
</s>
<s>
Processor	O
2	O
receives	O
the	O
packet	B-Protocol
,	O
which	O
now	O
contains	O
only	O
the	O
payload	O
'	O
M	O
 '	O
and	O
the	O
checksum	B-Algorithm
.	O
</s>
<s>
Several	O
parameters	O
help	O
evaluate	O
a	O
network	B-Architecture
topology	I-Architecture
.	O
</s>
<s>
The	O
prominent	O
ones	O
relevant	O
in	O
designing	O
large-scale	O
multi-processor	B-Operating_System
systems	O
are	O
summarized	O
below	O
and	O
an	O
explanation	O
of	O
how	O
they	O
are	O
calculated	O
for	O
a	O
butterfly	B-Architecture
network	I-Architecture
with	O
8	O
processor	O
nodes	B-Protocol
as	O
shown	O
in	O
figure	O
1	O
is	O
provided	O
.	O
</s>
<s>
Bisection	O
Bandwidth	O
:	O
The	O
maximum	O
bandwidth	O
required	O
to	O
sustain	O
communication	O
between	O
all	O
nodes	B-Protocol
in	O
the	O
network	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
8	O
node	O
butterfly	B-Architecture
network	I-Architecture
can	O
be	O
split	O
into	O
two	O
by	O
cutting	O
4	O
links	O
that	O
crisscross	O
across	O
the	O
middle	O
.	O
</s>
<s>
Diameter	O
:	O
The	O
worst	O
case	O
latency	O
(	O
between	O
two	O
nodes	B-Protocol
)	O
possible	O
in	O
the	O
system	O
.	O
</s>
<s>
In	O
the	O
8	O
node	O
butterfly	B-Architecture
network	I-Architecture
,	O
it	O
appears	O
that	O
N(0,0 )	O
and	O
N(3,7 )	O
are	O
farthest	O
away	O
,	O
but	O
upon	O
inspection	O
,	O
it	O
is	O
apparent	O
that	O
due	O
to	O
the	O
symmetric	O
nature	O
of	O
the	O
network	O
,	O
traversing	O
from	O
any	O
rank	O
0	O
node	O
to	O
any	O
rank	O
3	O
node	O
requires	O
only	O
3	O
hops	O
.	O
</s>
<s>
Degree	O
:	O
The	O
complexity	O
of	O
each	O
router	B-Protocol
in	O
the	O
network	O
.	O
</s>
<s>
The	O
butterfly	B-Architecture
network	I-Architecture
switching	O
nodes	B-Protocol
have	O
2	O
input	O
links	O
and	O
2	O
output	O
links	O
,	O
hence	O
it	O
is	O
a	O
4-degree	O
network	O
.	O
</s>
<s>
This	O
section	O
compares	O
the	O
butterfly	B-Architecture
network	I-Architecture
with	O
linear	O
array	O
,	O
ring	O
,	O
2-D	B-Architecture
mesh	I-Architecture
and	O
hypercube	O
networks	O
.	O
</s>
<s>
Note	O
that	O
linear	O
array	O
can	O
be	O
considered	O
as	O
a	O
1-D	O
mesh	B-Architecture
topology	I-Architecture
.	O
</s>
<s>
Relevant	O
parameters	O
are	O
compiled	O
in	O
the	O
table	O
(	O
‘	O
p’	O
represents	O
the	O
number	O
of	O
processor	O
nodes	B-Protocol
)	O
.	O
</s>
<s>
Butterfly	B-Architecture
networks	I-Architecture
have	O
lower	O
diameter	O
than	O
other	O
topologies	B-Architecture
like	O
a	O
linear	O
array	O
,	O
ring	O
and	O
2-D	B-Architecture
mesh	I-Architecture
.	O
</s>
<s>
This	O
implies	O
that	O
in	O
butterfly	B-Architecture
network	I-Architecture
,	O
a	O
message	O
sent	O
from	O
one	O
processor	O
would	O
reach	O
its	O
destination	O
in	O
a	O
lower	O
number	O
of	O
network	O
hops	O
.	O
</s>
<s>
Butterfly	B-Architecture
networks	I-Architecture
have	O
higher	O
bisection	O
bandwidth	O
than	O
other	O
topologies	B-Architecture
.	O
</s>
<s>
This	O
implies	O
that	O
in	O
butterfly	B-Architecture
network	I-Architecture
,	O
a	O
higher	O
number	O
of	O
links	O
need	O
to	O
be	O
broken	O
in	O
order	O
to	O
prevent	O
global	O
communication	O
.	O
</s>
<s>
Butterfly	B-Architecture
networks	I-Architecture
are	O
more	O
complex	O
and	O
costlier	O
than	O
other	O
topologies	B-Architecture
due	O
to	O
the	O
higher	O
number	O
of	O
links	O
required	O
to	O
sustain	O
the	O
network	O
.	O
</s>
<s>
The	O
difference	O
between	O
hypercube	O
and	O
butterfly	B-Application
lies	O
within	O
their	O
implementation	O
.	O
</s>
<s>
Butterfly	B-Architecture
network	I-Architecture
has	O
a	O
symmetric	O
structure	O
where	O
all	O
processor	O
nodes	B-Protocol
between	O
two	O
ranks	O
are	O
equidistant	O
to	O
each	O
other	O
,	O
whereas	O
hypercube	O
is	O
more	O
suitable	O
for	O
a	O
multi-processor	B-Operating_System
system	O
which	O
demands	O
unequal	O
distances	O
between	O
its	O
nodes	B-Protocol
.	O
</s>
<s>
By	O
looking	O
at	O
the	O
number	O
of	O
links	O
required	O
,	O
it	O
may	O
appear	O
that	O
hypercube	O
is	O
cheaper	O
and	O
simpler	O
compared	O
to	O
a	O
butterfly	B-Architecture
network	I-Architecture
,	O
but	O
as	O
the	O
number	O
of	O
processor	O
nodes	B-Protocol
go	O
beyond	O
16	O
,	O
the	O
router	B-Protocol
cost	O
and	O
complexity	O
(	O
represented	O
by	O
degree	O
)	O
of	O
butterfly	B-Architecture
network	I-Architecture
becomes	O
lower	O
than	O
hypercube	O
because	O
its	O
degree	O
is	O
independent	O
of	O
the	O
number	O
of	O
nodes	B-Protocol
.	O
</s>
<s>
In	O
conclusion	O
,	O
no	O
single	O
network	B-Architecture
topology	I-Architecture
is	O
best	O
for	O
all	O
scenarios	O
.	O
</s>
<s>
The	O
decision	O
is	O
made	O
based	O
on	O
factors	O
like	O
the	O
number	O
of	O
processor	O
nodes	B-Protocol
in	O
the	O
system	O
,	O
bandwidth-latency	O
requirements	O
,	O
cost	O
and	O
scalability	B-Architecture
.	O
</s>
