Efficient Baruch
Awerbuch
Deadlock-Free *
Shay
Abstract
This
deadlocks goal
deals in
is
with
~
to
design
with
small
tion
space.
signing
efficient
existing
ones
networks.
deadlock-free overhead
Our
main
routing
that
are superior
of their
performance.
major
concerns
tocols
for y,
full,
since
and
needs the
*Dept.
of Mathematics
and
Lab.
for
Com-
Watson Research Center. T*J. Watson Research tIBM Heights,
and
some
so on. to
a busy
deadlock
occurs
other In
car
for
network
some
to
life, that
any
of
this
the and
is analo-
often
Avoidance
in
be moved,
occur
or fast
store-and-forward
on reso-
deadlocks
utilization
efficient
node
be emptied, must
of are
buffers
other
move
message
day-to-day
set
nodes
in these
must
“gridlocks”
of such
at
of these
order
proInfor-
to some
intersection.
lution
Yorktown
of routing
messages
buffer
of the
is
of available
resources.
NY 10598.
tDepartment puter
this
gous
in
some
is one
net works.
“stuck” buffers
of the
Thus
essential center,
are
all the
each
set.
for
design
to be forwarded
messages, puter Science, M. I.T., Cambridge, MA 02139. Supported by Air Force Contract TNDGAFOSR-860078, ARO contract DAAL03-86-K-0171, NSF contract CCR861 1442, and a special grant from IBM. Part of the work was done while visiting IBM T.J.
in the
communication
messages
nodes,
to
$
deadlock
a store-and-forward
when
is de-
Peleg
store-and-forward
mall
in communica-
contribution
protocols in terms
The
David
Introduction
The
store-and-forward
communication
schemes and
Kutten
1
paper
Routing
Science,
of Applied The
Mathematics
Weizmann
Institute,
This
and ComRehovot
ied
76100, Israel. E-mail:
[email protected]. Supported in part by an Allen Fellowship, by a Bantrell Fellowship and by a Walter and Elise Haas Career Development Award. Part of the work was done while visiting IBM T.J. Watson Research Center.
0-89791-439-2/91/0007/0177
in
the
proposed main
Permission to copy without fee afl or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and hs date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee andlor specific permission. @ 1991 ACM
problem
to avoid
locks.
is done,
the buffer
pool
ing
classes
tions (say, acyclic
177
routes
involves
buffer
into
two
of deadby dividing
classes
and utiliz-
so as to prevent
deadlocks
Some
on restricting in
the
solutions
the occurrence
order
by forwarding buffer
first
TU81].
are based
allowed
speaking,
for instance,
into
MS80,
stud-
can be classified The
attempting
[Gop84,
$1.50
solutions
This
extensively
Roughly
literature.
cat egories.
these
been
has
graph).
to
packets
of these the
avoid
solu-
family
of
deadlocks
according
to an
The
second
and-forward
approach
deadlocks,
“deadlock
detection
the philosophy nore”
that
thus
locks from mechanisms solving merous [AM86, JS89],
run
on this CJS87,
those
distinctions
The
network
measures
protocols
the
cols are communication,
time,
us define
in our
We make
measures
the
asynchronous network,
[GHS83].
is the
packet
total
is entered
delivered
at the
the
delay
time
normalization time
it
is one
take unit
nication tance
from
it arrives nication
into
the
the
(common)
lated
for
a packet
of time.
of hops
sent cost)
nication,
where
efficient scribed
to its destination,
i.e.,
it needs to perform
during
disuntil
unreasonable
are expected
sizes
number
advanced
its
The
works
amortized
com-
node.
of a routing
protocol
is its
general
178
Several
require
work
We
explicitly For
typical
com-
schemes
namely,
those
schemes
obey postu-
buffer
use )
to
becomes
less
MS80]).
and will
become
nodes
in
part
(relatively
fast
as network
even
the
(Currently, than
50
though
less expensive,
termediate of the
[Gop84,
outgrow
, even
most net-
buffers
per
memory buffers
networks
slow)
de-
per node
future,
technology.
typically
Moreover
buffers
(e.g.
in the
communication-
of the solutions
Q(n)
unreasonable,
is usually
commu-
over
complex-
issue.
the
This
actual
is taken
space
requirements
discuss
more
actual
maximum
trade-off
two
network
execution.
the
of
the
above,
These
schemes.
The
commu-
first
earlier
is the
to inherent
amount
algorithms.
two
in an n-vertex
(or
of actual
this
ones listed MS80].
us
a link
is the
address
thus
earlier.
commu-
traverse
inherent
and
non-obtrusiveness
Let
the maximum
of a packet
overhead
case ratio
to
The
its destination.
communication
that
the
on
routing
us consider
possibly and
in the network.
of any previous
to let
[JS89,
computing
we make
communication
of deadlock-free
among of
it is
assess the
we focus
time
until
to
paper,
this
is
Indeed,
system,
deadlocks,
difficult
are not aware
the
the
In ities
of a
into
possi-
are eventu-
future made
attempting
since
node
locally.)
drawback. dropped
ultimately
For
only
it
parison,
delay
been
back
further
communication takes
serious
have
progress
destination.
assumption
that
returned
subnet
of a protocol
munication
it
packets.
as a rather
between
of an
are car-
possibility
the
its source
of messages
worst
The time
requirement
the number
assumptions
point-to-point
cf.
packet
standard
let
routes
or the next
This
of dropping
making
cent ext.
the
headers,
to
common
the
proto-
and space;
either
use the
excludes
ally
stan-
(We
interfere
be computed
creating
The
not
re-
are limited
requirement
too much
for network
do and
can always
only
of the routing
they
decisions.
second
packets
rele-
These two
The
viewed
to
solutions. the following
process,
that
to what
on the route
So the
complexities.
routing
in the packet
wasting
measures
these
First,
the
of
a more
ourselves
non-obtrusive
quirements.
without
are their
call
number
We omit
we restrict obeying
resources. comparison
paper
his-
the abstract.
are algorithms
bility
is always
from
arrival
by the
in each node.
assumptions
G81,
messages
used
definition
ried
are some-
goal
route
buffers
scheduling
is
of message
is measured
formal
with
were list
Gop84,
ultimate
to
for
complexity
reNu-
strategy
Space
we may
some
a partial
0be82].
namely
and
sequences
In this
dead-
by dropping
CM82,
that
into
deadlocks
MM84,
destinations,
dard
harm
literature;
artificial.
vant
to “ig-
BT84,
same,
their
be better
[MM79,
We feel
of the
is based on
in the deadlock).
based
the
tories.
to as
and rely on efficient
involved
in
referred
network
detecting
solutions
proposed
what
the
all possible
store-
as it doesn’t
(for inst ante,
of the packets
the
it may
to time),
for
them
usually
as long
let
time
handling
/ resolution”,
the problem
us (and
to
general
in at in-
are
not
purpose
a
computer they
with
its
are a part
Putting
a lot
switch fast
(and and
of the in
(such
is not
problem,
and
only
a small
number
Although
both
able time-wise,
it is possible that
both
is exponential
in
time
that
case.
It is interesting is not
local
the
cause
Any
is the
we aware
these
ble
example
scheme only
of [MS80] ion
communication-optimal. rithm
uses O(n)
inefficient. with
the
buffers)
memory-efficient of [JS89],
overhead This
circumvent
2.1
tradeoff
space complexities. results
clearly
manifestation In
this
whose ment
O(log
that
(omitted
Is this
we
space
at the
this
is memory-
tradeoff even
present
an
of this
overhead
results
to” O(1) of increasing
of buffers
[JS89],
!i?aL-
same needed
although
with
complexities.
real?
are sent
tions,
who
may
edge,
then
the network
the of
flow
if packets
per
is higher
unit.
time
solved
in most
will
That
is, in our algorithm,
algorithm
necessarily
behavior restriction
every
com-
with
of
respect
node
v may
polynomial to
let
is by
every
each
that
is de-
some node
or destination) The
this
(or
179
packet.
this
e.g.,
and This
networks
a packet
guaranteeing
one
infinity,
permits
later.
In fact,
tha,n
of size 1 on the average.
its source
a new
rate,
we shall
to its destination
per
in reduc-
Specifically,
d
the network
buffers.
communication
have a window
int reduce
rate
to
for
node
We com-
at which
grow
Our
(not
If the
requirements
control.
but it
deliver
delivery
the
d destina-
one incoming
the network
than
that
can at best into
flow
algorithm
say,
are introduced
so will
livered
to,
Notice
each have only
time
waiting
Algorithm
control.
only
and
range.
the
algo-
of the
let us discuss
packets
if it is, its
buffers
hierarchical
new packets
(0( 1)
is 0(1)
per node.
abstract)
expense
algo-
be contrasted
overhead
n) buffers
is
the existence
that
a modification from
the
node,
this
is not in the polynomial paper
has
i.e.,
communication
indicate
communication
requires
which
case.
suggests
between
lower
Overview
First
has communication
$_I(n) in the worst
vs.
(See the
the communication
number
of [MS80]
n).
exhibit
rithm
nor are
algorithm
which
immediately
some
can
the
The
2
of buffers
overhead,
and thus
scheme
O(log
between
and
considerably
to results
the next
However,
buffers,
This
with existing
In-
on a solely
number
is the algorithm
our
of tradeoff
as that
of a communication-efficient
0(1 ) communicant
n)
o(1)
n)
of our algorithms
overhead
Thus
overhead
leading
that
ion
1.)
kind
worst
the number
to
O(log
1: Comparison
municat
require
bad scenarios, way
O(log
ones.
problem.
An
ing
Figure
examples.
fact
of an obvious
paper
exam-
the
is selected
additional
not prevents
this
schemes
in these
to be forwarded basis.
will
time
This
o(1)
in most
simple
to note that
0(1)
paper
surprising
n in
O(n)
This
reason-
at all the bottleneck
to exponential packet
to devise
[JS89]
using
well
the
O(n)
out
per node.
behave
Space
0(1)
other
pointed
solutions
Commun.
[MS80]
remains
Indeed,
we note
ples demonstrating
on this
seem very
and may
Author
switch.
it
JS89])
schemes
fact
tuitively,
easy.
of buffers
situations,
of buffers
that
proposed
common
fast
memory
a way
as [CJS87,
Instead,
and
fastest
such
this
that
memory.
of a “slim”
cheap)
papers
large
have size) possible
mechanism
will
ito
for
be discussed
can be relaxed, a window on
the
of si!ze average
destination
of
gorithm
v‘s packets. Let
us now
the entire
forwarding
a high-level Each
lar
buffers
A;
Ei,
for
1), whose
I?i and
task
(to
give
the
when
the
of the
token
tokens the
when
selves
“merge”
other
token
vertex
w,
to
to proceed. has arrived
the network.
the
destination) This
the
and
flow
a permit
its destination thus
active
again
and pro-
However,
the two
of the second
and releases
token
sig-
the
releasing
to its
(called tuitively,
creates
an
al-
be
180
done
should
trans-
simply
carried
there or the
node node.
much
freeing
the
this
re-
in order
tokens. Instead
we have
edge.,
direction
that
On
approach
tokens,
the
token
in which
devised,
separate “how
of the
to that
C.HECK
by a
is no need for
name
modifications.
in
at each
us to drastically
be clear
on every
keep-
of permits
following
Debt)
permits
of and
of locked
the
to be
track
the
starvation
Technically, plies
them.
description
it
T
way.
makes
has to be carefully
to prevent
locked,
(intuitively
hand,
laxat-ion
the
whom
can be used
of information
to release,
T
us to treat
enables
or a route
token
together,
For example,
is going
other
and exallows
w remain
arrives
it
require
some
possi-
of the number
it resides,
that
not
a
it
keep
to carry
than
happens
hence
in turn
a CHECK
can be
token
and
above.
T’ with
that
level. CHECK.
control
do
the permit
token
we re-
rather
by
enables
the amount
a
as a “general
we
token
ing account limit
l?i
problem
check,
“bunched”
This
will
implies
described
I.e.,
ble to manipulate,
that
and so forth.
z on the permit’s
approach
fer permits
an appropriate
The permit
permit
A;
the locked
i + 1 as well.
simplistic
the
Such
to become
arrival
the invariant,
this
Rather,
at level
mes-
required
a strategy
or
other
“freeing
if a
of log n.
particular
any
is that
message
generated
“unanimously”,
in the rendezvous
Ai and .Bi of vertex another
level
of
the
of the
of
it receives
to free
This
one of them
buffers
i permit
strategy
it is later
a permit
process.
a level
locked
a concep-
buffers
as part
of as informing
nifying
in
both
until
token
in which
locked
fact,
locked,
ceed in level
perform
proceed
remains
Bi
view
currency”,
to free
them-
communication
paradigm
is to
was merged.
are.
level”
the
message,
overcome
releasing
idea
this
one
freeing
stretch
must
solve
the reason
such
to-
a permit
to
locks another
that to
dedicated
the higher
Ai,
the
purpose
main
buffers
up
freeing
out
order
The
in the
i find
buffers
to preserve
(in
its partner
of level
two
“permit”
until
lax
i “represents” the
“go
Intuitively,
turns
that
attempt
in increasing
message”
More
the locked
seem
and goes up a level,
In
(be-
the
same
communication
Let
paper.
1). Hence
tokens
thought
buffers
It
action
buffer
of level
operation
mechanism),
locked
i.
of the
comprises
(of level
i + 1. In order
ited
to its
proceed
of this
say w, they
is promoted
remain
later)
at
vertex,
tual
idea
of an empty
two
result
free the locked
in level
of level
less congested
“stuck”
same
packet
cannot
a token
level,
Thus
buffers
difficulty
Intuitively,
the
may
implement.
sent to free them, An
to send yet another
7’ (in level
A token
simplified
be described
the
the
terminate. only
using
sage” in a token
(or process)
“freeing
elevator
to
of freeing
It would
use buffers.
complexity.
regu-
The way the idea is implemented
the technical 2i basic
two
i 0,
Process
may
chosen
some
process
buffer
next
i was generated
In case there
with
zero.
levels
If the
that
lt
DebtV(u,
that
edge we defined,
is, the
(but
queue and
for this
it finds
C7 on level
as follows.
than
different
is act i-
stract.
The
process
such edge by a round
(that
“de-
that
on its way.
Such a queue is kept for every
“auto-
task
and end up releastoken
to the end of the line out
The
to release
the edges of v, i.e., the edge served
it is released
is carried
process
is essentially
Locked
first pro-
at the same level.)
the internal
its
wait
other
a toIt
a CHECK
T has locked
(v, u) such
Then 7’ has to change
when
to the vertex
be diverted
v proceeds
is larger
at the top of the queue trivial
tex
by one.
and terminates.
that
some
at
task
the release
tokens
edge
creates
process
A CHECK
tokens
see whether
the appropriate
(if there
at
its
time
Packet
Level(T), check
way back
process.
releasing
matically”.
ing
v to
to w on
in another
destination.
and then
buffer
and
by some other The
to
waiting
with
entrance
reached
may, however,
buffer
InQueue(i)
the
the packet
of the the
(i) is now incremented
us consider
has
on level
counter
T acts as follows.
of neighbors
checks
token
its
of the edge from
T
cessor,
v on
is no Empty
let
delivers
by 1.
awaiting
T then
is another
debt
to the queue
is the queue
that
ken
This
to enter
DebtV
Next
to accom-
at w switches
i) at w is increased that
Empty.
waiting buffer
able Int
appro-
in v emp-
in order
Further,
Now suppose
the
Ai
to state
accepting
Active.
DebtW(v,
buffer
be used
another
level i. The
enters
buffers
Note Locked,
although both
both
level
have already process (i.e.,
Empty),
empty.
both
C2, both in
internal
CHECK
at this
=
on level
at level
case
that
edge
was
the
one
=
is the
The The
to U[”l.
the
vertex
TOKEN(T)
are described for
these
using
processes
grate along
and
Figures
algorithms
2 and
is described
(or
“tokens”
), that
over
an edge,
carrying
their
variables
with
them
Such
a process
is executed grates,
[KKM85].
at a processor
or executes
description
until
a Wait
description
Get-Msg point
format.
The
Let
us define
the
status
to view posed
of
each
basic
concepts
the
system.
It
vertex
v of the
of 6 + 1 distinct
layer
. . . , V[bl, one for each level. 0, consists
of the
the queue
InQueue(i).
the external the
buffers
entity
packets
by
directed
edges
1 ~ i ~ 6. There leading over, ration directed
The
from in order at any
V[il)
is also
V[il to
Multigraph
and
for
to represent given
moment, obtained
the
leaves.
in the
tree
The is one,
O.
A non-merge
in status
For a merge
two
of its buffers
one of them
may
Locked.
root
The
v~l containing
level.
process,
(i.e.,
is of level i + 1. For
and
in status
The kinds.
as its parent
vertex
is a node
We say that debt
adja-
By this Active
a debtor
we mean
or Stuck,
eior a
of level j.
the
each edge
(vI;],
every
the
Debt
U[il)
debt i.
edge
configu-
by taking
status
residing
vertex
occurs
A trace
the
D (which,
rently
in the graph
each
183
in the
or in
tree
a layer
as a merge charges
be a token cur-
vl~l if this
of the tree.
is a collection
G with
V[il if
a check)
vertex
the
currently
tree
may or
covers
vertex
debt
again, Stuck
as the root
cover
layer
a certain
Active
tree
Locked
of the
V[il occurs
Similarly,
the debtor in
More-
we consider
vertex
trace
T in status
in a buffer
vertex.
for
a certain
of a token
residing
V[il. We
v is represented
a directed
V[i-ll
a token
CHECK
v with
edges
(i.e.,
u and
(uiil,
E~ and
its
V[”l represents
for each layer
the vertices
Locked
of the appropriate
of the edges as directed
connecting
are in status
V[”l, viol,
provides
send.)
merge
vertices B~ and
and
a merge vertex.
of level i, its parent
a token
lay-
properties.
a packet
of layer
each non-leaf
ther
in the
The edges of the tree
towards
are all
of the tree
Ai,
sent
2 is called
as com-
V[il, for i >
tree
are V{il and Ulil for some i).
contain
in
directed
is 1 or 2. A leaf or a vertex
graph
Vertex
in v that
cent to v are duplicated think
is convenient
(Vertex
it must
regarding
network
~.
is of the same level
vertex
some
the
u[ll
in which
of the tree are of the following
leaves
they
Analysis
into
of each vertex
in-degree
vertices vertex
3
who
downwards
with
to any
event
following
Waiting.
and its it-degree
This
translation
is still
out-degree
mi-
instruction.
has an efficient
standard
it either
the
these
= Waiting
the
graph
G with
num-
edge from
tree is a directed
A leaf is a vertex
can mi-
if Get_Msg debt
i)
of u
+ 1 to u[~l
to the resulting
layered
graph
the
) We term
was introduced
trace
ered
layer
u(ayeri
represents
We refer
i’th
(Similarly,
edges from
as the
A
3.
of v.
i).
are DebtU(v,
the
is an internal
u).
DebtU(v,
there
from
of IntDebt(i).
(This
a packet
a
network,
time
going
layer
there
graph
processes
code
i’th
multiplicity
debt edges. Also,
then
and terminates. CHECK(C)
given
edges
value
edges
allowing
the
with
ber of internal
1 and
selected,
into
at any
to the
=
terminates.
to Ready,
to be entered
I.e.,
processes
Level
(u[i], V[il)
parallel
i – 1
status(13i_l)
i– 1, and
the
edge
vertex
case the
two new CHECK
sets GetMsg
packet
Inthis
buffers
status(Ai_l)
Finally,
Otherwise,
merged
been delivered.
spawns
C’l and
new
now
C releases
sets
the
are
i – 1 tokens
the following
of trace
trees
properties.
Process
TO.KE~(p,
Level-
Packet
on path
p “/
self
t
Wait
until
Getlsg
Get_Msg +
t
Temp
/“
do
# Active
if Status
Ready
“/
:
then
wait
the edge from G {ALevel,
X
initially
Active)
# Dest(p)
Traverse ZX,
= heady
waiting
(p, Packet,
While
If
deliver
1,
Temp
&
/“
Packet),
until
status
= Active
Temp to z = iVezi(p,
BL.vel},
Temp).
= Empty,
Status(X)
InQueue(Level)
= Empty
then
do
:
X+T DebtZ(Temp, Traverse Buffer
do
put
back t
Traverse Else
Level)
-
Debtz(Temp,
+ 1
to Temp.
(0,0,
/“
Empty)
to z = Next(p,
/“
Temp)
ready
has been forwarded*/
to continue /*
{(Temp,
Buffer)}
back
&eve~,
+
&eve~},
Y # Buffer,
StatUS(Y)
= StLIC~
Level+
Status(Buffer)
t +
IntDebtse~~Level)
+ 1
Stuck. /“
Packet
to the
Create
a check
process
do :
1
End_while Deliver
then
Locked
Set IntDebtse~~Level)
Status(Buffer(T))
buffer
Locked
t
status(Y) t
forward
in InQueue(Level)
Status(Buffer)
Level
moving no available
to Temp.
If ~yj y ~ {ALevel, &,.~+1 + Buffer
Set
the packet
:
Traverse
Else
Level)
local C = +
processor. (Level).
Empty. Figure
2: Process
184
TOKEN
reached
destination*/
*/ “/
process /“
C~ECl((Level):
process
While
has form
*/
IntDebt~e~~Level)
Orthere If
(Level)
exists the
next
>0
anedge(sel{ edge
u)suchthat
in the
Debtsej~u,Level)
round
Debtsel~u,
robin
order
of Level
+Debt~e~~u,Level)
Traverse
tou.
If~X~
{ALevel–l,
Level)
>Odo
is not
the
:
internal
/*
Else
EL.vel X
t
+
&evel-1,
EL.v,l_l},
packet(X)
t
Let
then
X,Ybe
do
two
two
Locked
to elevator
empty
buffers
in Level-l
check
processes
Set IntDebtse~~Level)
buffer
“/’
and keep locked
“/’
Release
at level
in Status
token
Level
*/’
– 1 ‘/’
Locked
t
Cl=
(Level
–l)and
IntDebtse~~Level)
C2=
(Level
–1).
– 1 /“
GetJ4sg=lVaiting
GetJ4sgt
*/
do:
tEmpty.
Else If
empty
is next
:
the buffers
Status(X),Status(Y) Create
move
/*
edge
Lockedthen
/“ /“
>1
/“ Active
Else
Level
then
internal
status(X)=
Locked)
Status(EL.vel) If
+0,
X
(0,0,
edge
–1
thendo
Ready
Terminate
End_while Figure
3: Process
185
CHECK.
Level=
1’/
1. Every
token
exactly
T with
one trace
status
tree
Locked
covering
eventually
has
be released.
to show
its debt.
later
ery Locked 2. Every tree
debtor charging
3. Every one
a trace
and
another
if there
since
from
extended
the
number
at each level
variables), Still,
we can prove
(All
proofs
of the algorithm,
time
exists
a trace
cover for
ther The that
trace the
stated
trees
already
algorithm
Lemma
3.2
enable
us to prove
is well-defined.
in Lemmas
This
z there are 2; vertices
token
with
T be the time
at
time
or check
Getllsg
of level
2’ be
in the layered
= Waiting.
buffer,
require
a buffer
Lemma
3.4
to perform
At no time of Level
. At any time,
a merge buffer
E;+l
A trace
tree traces
to know
6.
if two tokens
operation
the elevator
than
route
(on
from
I
3.5 the
a debtor
edge which buffer the
to either
directed trace
the
that
that this
algorithm
way
token will is only
these
above Stuck
or to a check, eventually
does not
“know”
lowing
the
Let
deleted. event
path
in
the
debtor
route layered
to (a vertex or Stuck
a Locked
a permanent
(ei-
to any
a return
Stuck
edge can
edge is one from
(Again,
we shall
not
need
edge is permanent.) At
any
layered
time,
there
graph)
to
who is not Stuck,
is a return every
packet
or from a Stuck
is not permanent.
token
3.6
(in the layered
to a
buffer
or to a Stuck definition;
desired
Lemma
to help us tokens
which
edges be those
happening
with)
us
edges. Out of
I
3.5 is used in the proof
Lemma
However,
be released.
an auxiliary
Let
a Locked
We now extend
defined
from
from
or a check.
be Stuck.
Multigraph
non-Stuck token
a token
may
token
the route
graph
deleted
last event
the last
if the previous
which
Lemma
wish
at level i, then
is Empty.
a directed
some U[il to U[i–ll.
does the algorithm
larger
(The
on are never
edge.
such that
Consider
be a deletion).
after
that
under-
and
stable
is
and in-
execution.
a non-Stuck
from
buffer
an edge
inserted
or insertion) stable
in the lay-
deleted,
of times.
may
some time
be used only 3.3
are
it suf-
of deletions
the
that
number
deletion
graph
I Corollary
that
number
an edge
eventually
is
3.2 and 3.4.
For every
Note
throughout edges
from
Let
B
i trying
or Stuck
on is never
a finite
a finite
which
i
edge in the
to (a vertex
a Locked
these edges, let the permanent
the execution
graph
property,
directed
call such edges eventually
abstract.)
there
leading
deleted.
some
of such
For
u to v at level
at v in level
every
from
only
are omitted
that
eventually
the
and ev-
released.
the above fairness
with)
all
token
us
u.
graph,
sertions
the
Stuck
ered graph
goes only
is
a check gen-
At any time during
G.
locked
edge from
is a token
fices to show
a buffer
that
only
passing
tree.
invariant.
3.1
in which
Stuck
enable
let us add to the layered
To prove
the same
will
are eventually
Stuck
to get into
may
on one tree may be used to
following
the graph
there
of the token
checks
by a token
Lemma
that
tree
However,
this
purpose
layered
(in the Debt
release
that
in at most
edges between
keeps trace
recorded
trace
)
buffer.
erated
(Recall
debt
Intuitively,
of tokens
one
is included
tree.
vertices.
exactly
This
every
buffer
a directed
edge
trace
is locked
has
it.
debt
be parallel
the
D
that
)
(Note
To
the
that
will
the
186
Every
conclude network
edge
graph)
is eventually
a vertex
of the fol-
result: with
leading
a Locked
deleted. the
that
a vertex or Stuck
B
correctness introduced
is prevented
to
from
part, a packet
recall into
introducing
another
until
Lemma
3.7
Get-Msg
its
Get_Msg
equals
Eventually,
variable
the
becomes
Ready.
value
[BT84]
of
Ready.
every
~
G.
Bracha
algorithm.
analyze
It is easy to see that
requirement
is logarithmic
communicant Lemma
3.8
of the
deadlock
detection.
As for
algorithm
the
FIFO
cide
discipline
which
the time [JS89, with
I. Cidon,
in the
the
to
worst
namely,
order
decisions
[CM82]
1984.
and
as in (more
we can prove
and
M.
Sidi.
forward
Trans.
on
Dis-
deadlock
resolution
algorithms.
Commun.,
35:1139-1145,
May
1987.
K.M.
and
J.
Chandi
tributed
However,
additional
Dis-
285-301.
COM[-
de-
Thus
same
exponential. of
to
next.
case is the
introduction
scheduling
in
3~~d
of
pages
store-and
detection
1
advance
dis-
Proc.
Principles
J. Jaffe,
tributed
of
so far uses only
locally
packet
MS80],
global)
as described
A
generalized In
on
August
IEEE The algorithm
for
Computing,
ACM, [CJS87]
overhead
is 0(l).
Toueg.
the
we can show
The communication
Symp.
tributed
the memory
in n.
ion overhead,
hierarchical
the
the performance
S.
algorithm
ACM
Let us now
and
tributed
algorithm
source
deadlocks
tems.
In
in
Proc.
Principles
the
Misra.
for
157–164.
K.D.
Gunther.
disre-
distributed
1st ACM ACM,
sys-
Symp.
of Distributed
pages
A
detecting
on
Computing, August
1982.
following:
Theorem so that
3.9 with
The algorithm
the same communication
and number
of buffers,
within
0(rz2 logn)
time
the network.
[G81]
can be extended
locks
overhead
every packet
is delivered
of the time
in
port
H
[GHS83]
We are grateful
to
Sidi
with
for
of this
helpful
working research
Israel
Cidon
and
Moshe
us in the
early
stages
and for many
stimulating
Spira.
weight
ACM
on
Trans.
Gop84]
discussions.
References
JS89]
1.S. Gopal.
works.
Research
Y. Afek,
B. Awerbuch,
Applying
static
dynamic
networks.
IEEE puter
Sgmp.
network
protocols In
Proc.
on Foundations
Science,
October
and E. Gafni.
pages
B.
[KKM85]
Jaffe
M.
namic In
deadlock
Proc.
dations
November
27th
S.
IEEE,
Micali.
resolution IEEE
of Computer
Symp.
in
RC-10677,
Distributed store-and
Algorithmic,
E. Korach,
S. Kutten, technique
for-
4, 1989.
In
Dy-
ing. ACM,
and
S. Moran.
for the design
distributed
gorithms. and
net-
1984.
Sidi.
resolution
A modular efficient
1987.
Awerbuch
Report
J.M.
on Principles
[AM86]
computer
to 28th
of Com-
358-370.
of store-and-
in
August
networks.
trees. Lang.
1983.
Yorktown,
ward
and
algorithm
spanning
IBM
and
1981.
Humblet,
Prevention
deadlock
deadlock
[AAG87]
May
Programming
5:66–77,
forward
trans-
on Com,-
A distributed
for minimum and Syst.,
and
Trans.
P.A.
Gallager,
P.M.
Acknowledgments
data
IEEE
COM-29:512–524,
R. G.
of dead-
packet-switched
systems.
mun.,
it entered
Prevention
leader
Proc.
dth
finding ACM
of Distributed August
of al-
Symp. Comput-
1985.
protocols. on Foun-
Science.
[Mar82]
IEEE,
James ing
1986.
wood
187
Martin,
SIVA:
Cliffs,
IBM’s
Prantice
Solution, NJ,
1982
iVetwork-
Hall,
Engle
[MM79]
D. A. Menascoe ing
[MM84]
and
detection
tributed
databases.
IEEE
Software
Eng., SE-5:195-202,
D.P.
Mitchell
tributed
and
M.
algorithm
tection
and
ACM
Symp.
tributed
[MS80]
and R. Muntz.
deadlock
for
de-
%oc.
t?rd
Principles
of
Computing,
P.M.
Merlin
and
[TU81]
P.J.
avoidance networks IEEE
R. Obermarck.
282-284.
store-and-
i: Store and forward on Commun.,
March Distributed ACM
1980. deadlock
detection
algorithm.
Database
Syst., 7:187-208,1982.
S. Toueg and J.D. Unman. free packet switching J. on Comput.,
Dis-
Schweitzer.
in
Tmns.
COM-28:345-352, [Obe82]
pages
1984.
deadlock.
A dis-
In
August
forward
on
1979.
deadlock
ACM,
Deadlock
dis-
Trans.
Merritt.
resolution.
on
Lockin
Trans.
Deadlock-
networks,
10:594-611,
on
SIAM
1981.
188