<s>
A	O
routing	B-Protocol
algorithm	I-Protocol
decides	O
the	O
path	O
followed	O
by	O
a	O
packet	B-Protocol
from	O
the	O
source	O
to	O
destination	O
routers	B-Protocol
in	O
a	O
network	B-Architecture
.	O
</s>
<s>
An	O
important	O
aspect	O
to	O
be	O
considered	O
while	O
designing	O
a	O
routing	B-Protocol
algorithm	I-Protocol
is	O
avoiding	O
a	O
deadlock	B-Operating_System
.	O
</s>
<s>
Turn	B-Protocol
restriction	I-Protocol
routing	I-Protocol
is	O
a	O
routing	B-Protocol
algorithm	I-Protocol
for	O
mesh-family	O
of	O
topologies	B-Architecture
which	O
avoids	O
deadlocks	B-Operating_System
by	O
restricting	O
the	O
types	O
of	O
turns	O
that	O
are	O
allowed	O
in	O
the	O
algorithm	O
while	O
determining	O
the	O
route	O
from	O
source	O
node	B-Protocol
to	O
destination	O
node	B-Protocol
in	O
a	O
network	B-Architecture
.	O
</s>
<s>
A	O
deadlock	B-Operating_System
(	O
shown	O
in	O
fig	O
1	O
)	O
is	O
a	O
situation	O
in	O
which	O
no	O
further	O
transportation	O
of	O
packets	B-Protocol
can	O
take	O
place	O
due	O
to	O
the	O
saturation	O
of	O
network	B-Architecture
resources	O
like	O
buffers	B-General_Concept
or	O
links	O
.	O
</s>
<s>
The	O
main	O
reason	O
for	O
a	O
deadlock	B-Operating_System
is	O
the	O
cyclic	O
acquisition	O
of	O
channels	O
in	O
the	O
network	B-Architecture
.	O
</s>
<s>
For	O
example	O
,	O
consider	O
there	O
are	O
four	O
channels	O
in	O
a	O
network	B-Architecture
.	O
</s>
<s>
Four	O
packets	B-Protocol
have	O
filled	O
up	O
the	O
input	B-General_Concept
buffers	I-General_Concept
of	O
these	O
four	O
channels	O
and	O
needs	O
to	O
be	O
forwarded	O
to	O
the	O
next	O
channel	O
.	O
</s>
<s>
Now	O
assume	O
that	O
the	O
output	O
buffers	B-General_Concept
of	O
all	O
these	O
channels	O
are	O
also	O
filled	O
with	O
packets	B-Protocol
that	O
need	O
to	O
be	O
transmitted	O
to	O
the	O
next	O
channel	O
.	O
</s>
<s>
If	O
these	O
four	O
channels	O
form	O
a	O
cycle	O
,	O
it	O
is	O
impossible	O
to	O
transmit	O
packets	B-Protocol
any	O
further	O
because	O
the	O
output	O
buffers	B-General_Concept
and	O
input	B-General_Concept
buffers	I-General_Concept
of	O
all	O
channels	O
are	O
already	O
full	O
.	O
</s>
<s>
This	O
is	O
known	O
as	O
cyclic	O
acquisition	O
of	O
channels	O
and	O
this	O
results	O
in	O
a	O
deadlock	B-Operating_System
.	O
</s>
<s>
Deadlocks	B-Operating_System
can	O
either	O
be	O
detected	O
,	O
broken	O
or	O
avoided	B-Operating_System
from	O
happening	O
altogether	O
.	O
</s>
<s>
Detecting	O
and	O
breaking	O
deadlocks	B-Operating_System
in	O
the	O
network	B-Architecture
is	O
expensive	O
in	O
terms	O
of	O
latency	B-Protocol
and	O
resources	O
.	O
</s>
<s>
So	O
an	O
easy	O
and	O
inexpensive	O
solution	O
is	O
to	O
avoid	O
deadlocks	B-Operating_System
by	O
choosing	O
routing	B-Protocol
techniques	O
that	O
prevent	O
cyclic	O
acquisition	O
of	O
channels	O
.	O
</s>
<s>
Logic	O
behind	O
turn	B-Protocol
restriction	I-Protocol
routing	I-Protocol
derives	O
from	O
a	O
key	O
observation	O
.	O
</s>
<s>
This	O
means	O
deadlocks	B-Operating_System
can	O
be	O
avoided	B-Operating_System
by	O
prohibiting	O
at	O
least	O
one	O
of	O
the	O
clockwise	O
turns	O
and	O
one	O
of	O
the	O
anti-clockwise	O
turns	O
.	O
</s>
<s>
All	O
the	O
clockwise	O
and	O
anti-clockwise	O
turns	O
that	O
are	O
possible	O
in	O
a	O
non	O
restricted	O
routing	B-Protocol
algorithm	I-Protocol
are	O
shown	O
in	O
fig	O
2	O
.	O
</s>
<s>
A	O
turn	B-Protocol
restriction	I-Protocol
routing	I-Protocol
can	O
be	O
obtained	O
by	O
prohibiting	O
at	O
least	O
one	O
of	O
the	O
four	O
possible	O
clockwise	O
turns	O
and	O
at	O
least	O
one	O
of	O
the	O
four	O
possible	O
anti-clockwise	O
turns	O
in	O
the	O
routing	B-Protocol
algorithm	I-Protocol
.	O
</s>
<s>
This	O
means	O
there	O
are	O
at	O
least	O
16	O
(	O
4x4	O
)	O
possible	O
turn	B-Protocol
restriction	I-Protocol
routing	I-Protocol
techniques	O
as	O
you	O
have	O
4	O
clockwise	O
turns	O
and	O
4	O
anti-clockwise	O
turns	O
to	O
choose	O
from	O
.	O
</s>
<s>
Dimension	O
ordered	O
(	O
X-Y	O
)	O
routing	B-Protocol
(	O
shown	O
in	O
fig	O
3	O
)	O
restricts	O
all	O
turns	O
from	O
y-dimension	O
to	O
x-dimension	O
.	O
</s>
<s>
Even	O
then	O
since	O
it	O
restricts	O
the	O
number	O
of	O
turns	O
that	O
are	O
allowed	O
we	O
can	O
tell	O
that	O
this	O
is	O
an	O
example	O
for	O
turn	B-Protocol
restriction	I-Protocol
routing	I-Protocol
.	O
</s>
<s>
West	O
first	O
routing	B-Protocol
(	O
shown	O
in	O
fig	O
4	O
)	O
restricts	O
all	O
turns	O
to	O
the	O
west	O
direction	O
.	O
</s>
<s>
North	O
last	O
routing	B-Protocol
(	O
shown	O
in	O
fig	O
5	O
)	O
restricts	O
turning	O
to	O
any	O
other	O
direction	O
if	O
the	O
current	O
direction	O
is	O
north	O
.	O
</s>
<s>
Negative	O
first	O
routing	B-Protocol
(	O
shown	O
in	O
fig	O
6	O
)	O
restricts	O
turning	O
to	O
a	O
negative	O
direction	O
while	O
the	O
current	O
direction	O
is	O
positive	O
.	O
</s>
<s>
This	O
means	O
any	O
hop	B-Protocol
in	O
one	O
of	O
the	O
negative	O
directions	O
should	O
be	O
taken	O
before	O
taking	O
any	O
other	O
turn	O
.	O
</s>
<s>
Avoiding	O
deadlocks	B-Operating_System
is	O
less	O
expensive	O
to	O
implement	O
than	O
deadlock	B-Operating_System
detecting	O
and	O
breaking	O
techniques	O
.	O
</s>
<s>
Turn	O
restrictions	O
provide	O
alternate	O
minimum	O
length	O
paths	O
as	O
well	O
as	O
non	O
minimum	O
length	O
paths	O
from	O
one	O
node	B-Protocol
to	O
another	O
,	O
which	O
allows	O
routing	B-Protocol
around	O
congested	B-Protocol
or	O
failed	O
links	O
.	O
</s>
<s>
Say	O
there	O
are	O
multiple	O
routers	B-Protocol
,	O
F1	O
,	O
F2	O
etc.	O
,	O
that	O
feed	O
packets	B-Protocol
to	O
a	O
congested	B-Protocol
,	O
but	O
low-cost	O
link	O
from	O
source	O
router	B-Protocol
S	O
to	O
destination	O
router	B-Protocol
D	O
.	O
Implementing	O
Turn	B-Protocol
restriction	I-Protocol
routing	I-Protocol
means	O
that	O
some	O
of	O
the	O
turns	O
from	O
any	O
of	O
the	O
feeder	O
routers	B-Protocol
to	O
the	O
congested	B-Protocol
router	B-Protocol
S	O
may	O
now	O
be	O
restricted	O
.	O
</s>
<s>
Those	O
feeder	O
routers	B-Protocol
may	O
have	O
to	O
use	O
a	O
longer	O
path	O
to	O
get	O
to	O
destination	O
D	O
,	O
thereby	O
decongesting	O
the	O
link	O
from	O
S	O
to	O
D	O
to	O
an	O
extent	O
.	O
</s>
