http://wrap.warwick.ac.uk/
Original citation:
Goldberg, Leslie Ann and MacKenzie, P. D. (1997) Contention resolution with
guaranteed constant expected delay. University of Warwick. Department of Computer Science. (Department of Computer Science Research Report). (Unpublished)
CS-RR-328
Permanent WRAP url:
http://wrap.warwick.ac.uk/61016
Copyright and reuse:
The Warwick Research Archive Portal (WRAP) makes this work by researchers of the University of Warwick available open access under the following conditions. Copyright © and all moral rights to the version of the paper presented here belong to the individual author(s) and/or other copyright owners. To the extent reasonable and practicable the material made available in WRAP has been checked for eligibility before being made available.
Copies of full items can be used for personal research or study, educational, or not-for-profit purposes without prior permission or charge. Provided that the authors, title and full bibliographic details are credited, a hyperlink and/or URL is given for the original metadata page and the content is not changed in any way.
A note on versions:
The version presented in WRAP is the published version or, version of record, and may be cited as it appears here.For more information, please contact the WRAP Team at:
Research
R"port
328
Contention Resolution
with
Guaranteed
Constant Expected
Delay
Leslie
Ann
Goldberg
and
Philip D.
MacKenzie
RR328
We
study contention resolution
in
multiple-access channels such asthe
Ethernet.
Under
a stochasticmodel
of
continuous packet generationfrom
a setof n processors,
we construct aprotocol which
guarantees constant expected defayfor generation rates
up to. afixed
constant*hl"tt
is
lessthln
1.
Previousprotocols
which
are
stablefor
constantarrival rates
do
notguarantee constant expected delay. The two protocols that achieved results closest to this are one
5y Raghavan and Upial, which
only
guaranleeslogarithmic
(in
n)
expected.dg!ay,an{
o.ng.byPiters6n and Srinivasan, which
only
guarantees constant expected delaywith
high probability. (In the latter protocol, there is a non-zero probability that the initial clock_synchronizationmight
iail
and causethe
expected delayto
grow
unboundedly.)
Although
those protocolsdo
notguarantee constant expected delay, we have used ideas
from
themin
the constructionof
ourirotocol,
which
does guarantee constant expecteddelay.
We
achieveour
results using- aiechnique called
Robu{t
Synchronization which is applied
periodically.in
our
p.rotocol. 'The introduction of this technique and the analysis of this technique are the major contributions of the paper.Department of Computer Science
University of Warwick
Coventry CY47AL
United Kingdom
Contention
Resolution
with
Guaranteed
Constant
Expected
Delay*
Leslie
Ann
GoldbergtJuly 21,
LTR Project 20244
-
ALCOM-IT.lphilnacOcs. idbsu. edu. Dept. of Mathematics 83?25. Part of this work was performed at Sandia
under contract DBAC04-76DP00789.
Philip
D.
MacKenziet
1997
Abstract
We study contention resolution in multiple-access channels such as the Ethernet. Under a
stochastic model of continuous packet generation from a set of n processors, lve construct a protocol which guarantees constant expected delay
for
generation rates up to a fixed constant.lo(
1.
Previous protocols which are stable for constant arrival rates do not guaranree consrant expected delay. The two protocols that achieved results closest to thisu,." o.r" by Raghavan and Upfal, which only guarantees logarithmic (in n) expected delay, and one by Paterson and Srinivasan, which only guarantees constant expected delay with high problbility. (In the latter protocol, there is a non-zero probability that the initial clock synchro.rirutlon might
fail
and cause the expected delayto
grow unboundedly') Although those protocols do not guarantee constant expected delay, we have used ideasfrom them
in
the construction of our protocol, which does guarantee constant expecteddelay. We achieve our results using a technique called Bo6u st Synchronizalion rvhich is
applied periodically in our protocol. The introduction of this technique and the analysis of this technique are the major contributions of the paper'
1
Introduction
There
hasbeen
an enormous
amountof
work
on
contention
resolutionfor
Ethernet-like multiple-access channels (see,for
example, [3,4],
andthe references
therein).
Mostof
thiswork
has focused on backoff protocols,1".t"ai"g both constant backoff protocols (as in the Aloha network [1]) and increasing backoff protocols (asin
the
Ethernet network[6])'
Backoffprotocols work very well in practice and are therefore
worthy
ofstudy.
However,it
has been shownthat
the
expected packet delayof
backoff protocolswith constant generation
rate isO(r), where
n
is the
number of processors. (Histad, Leighton, andRogof
[4] showthis
for exponential, polynomial, and constant backoff protocols,but
the same lower bound techniquewould apply
to
other backoff functions.)fComputerScience,UniversityofWarwick,CoventryCV47AL, United Kingdom. An extended abstract of this reiort will appear in the Proceedings of the 38th Symposium
on Foundations of Computer Science, 1997.
tleelie0dcs.carcick.ac.uk.
Departmentof
Computer Science, Universityof
Warwick,Coven-try CV4 ?AL, United Kingdom. This work was supported by EPSRC Research Grant GR/L60982
-
Designood Aoutysi" of Contention-Resolution Protocols, by ESPRIT Project 21726
-
RAND-II and by ESPRITand Computer Science, Boise State University, Boise, ID, National Labs and supported by the U.S. Dept. of Energy
Raghavan and Upfal [8] were the
first develop a contention-resolution
protocol rvith o(rr) expected packet delay for a constant generationrate.
Specificaily,their
protocol allori's a generationrate up
to
about 1/10, while
achieving expected delayO(logn). A
key ideathat
allowsthe low
expected delayis that of a
"ResetState"
whichis entered when
badsituations are detected. Later, Paterson and Srinivasan [7] achieved constant expected delal'
for an
infinite
number of processors, assuming thatthe
processors have synchronized clocks,for generation rates
upto
about
lle.
Usingtheir
infinite-processor protocol, Paterson and Srinivasan designeda
protocolthat
can be used by n processors whose clocks differby at
mostB
(for some value -B) and,with
high probability, achieves constant expected packet delal' for generation rates up to about1/e.
This protocol starts with a "Pre-processing Phase" rvhich takes0(max{B,n})
time and succeedswith
highprobability. If
the pre-processing phase fails,then
the expected packet delay ofthe
protocol can growwithout bound.
Thus, the overall expected packet delay of the protocol is unbounded.In
this
paper
we affrrmatively answerthe
questionof
the existence
of a
contention-resolution protocol with constant expected packet delayin
the standard multiple-access chan-nel model, i.e., we present thefirst
protocolthat
achieves constant expected packet delay for generation rates upto
a fixed constant)6
(
1,without the
added requirementthat
proces-sors be startedwith
identical clocks.In
fact, our protocol allows processors tostart
and stop repeatedly(with
some constraints)with
no apriori
clock values, andit
still
achieves constant expected packet delay.Our
protocol uses the protocolof
Paterson and Srinivasan as a subroutine. The analysis of this subroutine requires processors to have synchronized clocks, and we are able to simulatetlris (for
reasonably long periods oftime)
using a new techniquefor
Robust Sgnchronization.In
particular, our
protocol incorporates repeated,robust
"synchronization Phases". Each ,,synchronization Phase" is similar tothe
"Preprocessing Phase" of Paterson and Srinivasan' exceptthat
our synchronization phases are performed repeatedly and are robustin
tire sensethat
they
donot
require processorsto have
similar clocks, and they can handle anypatho-logical
situation
(such as processorsstarting
in
the
middleof
a synchronization phase) andeventually
return to
a normal, synchronized state.In some sense,
the structure ofour
protocol (normal phases, occasionally interrupted bysynchronization phases) is similar
to
the structureof
Raghavan and Upfal's protocol (whichhas
normal
phases, occasionallyinterrupted
by
resetphases).
However, there are majordifferences between
them.
One d.ifferenceis
that, because lack
of synchronization cannot bereliably detected., synchronizing phases must be entered periodically even when no particular bad event is observed. Another difference is
that
processorsin
a reset state are only allowed tosend packets
with
very low probability, andthis
helps other processorsto
access the channel. However,our
synchronization phaseis
designedto accomplish
the
much-more-difficult taskof synchronizing the processors (this is needed to obtain constant expected delay rather than
logarithmic expected delay), and accomplishing this task requires many transmissions
to
the channel, which prevent accessto
the channel by the other processors. Thus, synchronization phases are costly in our protocol.A
third
difference isthat in
Raghavan and Upfal's protocol,a
normal
phase always tends towardslow expected
delay, and whenbad
situations arise,there
is
a
goodprobability of
them being caught, andthus
causinga
reset stateto occur.
In
our
protocol,a
normal phase tends towards even lower (constant) expected delayif
the processors are synchronized. However,if
they
are not synchronized,the
normal phase doesnext time
the processorsstart
a synchronizing phase, which may be afterquite
a long tirne!Fortunately, we are able to bound the effects of this type of behavior and
still
achieve coustant expected packet delay.1.1
Model
and
Definitions
Following
all of
the papers that we mentionin
sectionl.2,we
workin a time-.slotfed model
in
whichtime is
partitionedinto
intervals of equal length, called steps.In
our
basic model, we have ?z processors which canstart
and stopat arbitrary
steps'with
the
constraint thateach
time
a processor starts,it
runsfor
at least a certain polynomial number of steps.l packets are generatedat
the
processors accordingto
a probability
distribution.
Ilnderthe {.\;}1a; <n-iidepend,ent a::ivals
distribution,
each processori is associated
with
a positive pro6uUitity1;
andit
generates a message independentlywith
probability
);
during each time stepthat
it
isrunning.
For technical reasons, we also consider other arrival distributions. We saythat
an arrival distribution is {);}14;a,, -dominated(for
)1, . . .,)'
> 0) if the
total arrivalrate,
.\
=
D;
A;,is
at
most e for.
roffi.iently
small positive constant e,
andthe
followingcondition is satisfied: For every plocessor
f,
every step I in which processori
is running, and every event E concerning the arrival of messages at steps otherthan
I
orat
processors other thani, the
probability that
processor i generates a message at step l, conditioned on event -B' isat
most);.
The
packets which arriveat
the
processors mustbe transmitted
to
the multiple
accesschannel which handles contention as follows: when
multiple
processorsattempt to
transmitto
the channel at the same time, none succeed.If a single processor
attemptsto
transmit tothe channel,
it
receives an acknowledgementthat
the transmission was successful. Processorsmust queue
all unsuccessful packets
for
retransmission, and they use a contention-resolutionprotocol
to decide when
to retransmit.
During the time
that
a
plocessoris
trying to
sendone packet,
it
may generate more packetsthat
it
needsto transmit'
These packets must also be queued.An important
feature of a good contention-resolution protocol isthat,
even when packets are generatedfairly
frequently, the sizes ofthe
queues donot
grow unboundedly'We say a
protocol
is
stableif
the
expected size of the queues remainsbounded'
More formally, IetW;
be the waitingtime
of therth
packet, and let'tfr
WavF=
-li{n^^
=D,Wr.
)
m+oo rn=i
(Intuitively
,
Wavgis the average waiting time of packets in the system.) We say that a protocolis
stableii
BlWJ"g] is
finite.
For
stable protocols,we
are concernedwith
the
maximum generationraie
) tltt
.uo
be stably sustained, and with the valueof
B[l7avg]'L.2
Previous Work
There has been a tremendous amount of work on protocols for multiple-access channels' Here
we
will only d.iscuss
the work on
dynamic protocolsin
the acknowledgement-based model
that
we use. We refer the readerto
the papers cited herefor
discussion of previous work onprotocols using different assumptions or models.
esultsinSection4,werequirethispoIynomialtobe8n7l1however,
Aldous [2] showed
that for
any) )
0, binary
exponential backoffis
unstable rvhen tlie numberof processors
is
infinite.
Kelly
[5] showed asimilar result
for
polynomial backoffprotocols.
Hi,stad, Leighton, and Rogoff [4] showedthat
polynomial backoff is stable (withan
expected delayof
r,,'(z))for
any
) <
1
whenthe
numberof processors
is
fi.uite, andthat
binary
exponential backoffis
unstablefor
)
>
.567, whenthe
numberof
processors isfinite.
Raghavan andUpfal
[B] givea
protocolwhich,
for
) <
i/10,
is
stablefor
a" finitenumber
of processors,
n,
and achieves O(logn) expected
packetdelay. Their
protocol hasthe
added benefitof
being a fairly simple, clean protocol. Paterson and Srinivasan [7] givea very clever protocol which,
for
)
<
1fe,is stable
for
aninfinite
number of processors withsynchronized clocks,
or
stablewith
high probabilityfor a finite
numberof
processors with almost synchronized clocks, and achieves constant expected packet delay, againwith
highprobability.
(With some
small probability, the delayof their
protocol is unbounded.)1.3
Our
Results
We present a protocol which,
for
a small constant),
is
stablefor any
finite
number of pro-cessors and guaranfees constant expected packetdelay.
In
our
model, we donot
make any assumptions about a previously synchronizedor
almost synchronizedclock.
(Notethat the
lambda usedin
our protocol is very small, a few orders of magnitude smaller than the lambda usedin
previousresults.
We donot
claimthat our
protocol
is a
practicalprotocol. The
significanceof our
protocol istwo-fold: (1)
it
isthe
first
protocolwith guaranteed constaut
expected delay, and(2)
the ideas behindit,
mainly
the
Robust Synchronizalion technique,could be useful in other practical protocols.)
The structure of our
protocolis simple. Most
of the time,
the
processors are runningthe
"infinite
processors" protocolof
Paterson and Srinivasan. The analysis ofthat
protocol assumesthat
processors have a synchronized clock. Therefore,in
our protocol, the processors occasionally enter a synchronizing phase to make surethat
the
clocks are synchronized (orto
resynchronizeafter a
processor enters the system).Note
that the synchronizing
phase has someprobability
of (undetectably)failing,
andthus
it
must be repeated periodically to guarantee constant expected packet delay.The
synchronizing phase of our protocol is somewhat complicated, becauseit
must syn-chronizethe
processors even though interprocessor communication canonly
be performedthrough acknowledgements (or lack of acknowledgements)
from
the multiple-access channel.(Thisls
the
model used in all previous papers.)The
analysis of our protocol is also compli-cated dueto
the very dynamic nature of the protocol,with
possibilities of processors missing synchronizing phases,trying to start
a synchronizing phase while one is alreadyin
progress' and soon.
Our synchronizing phases are robust,in
the sensethat
they can handle these typesof events, and eventually the system
will
returnto a
normal synchronized state.To give an idea of the problems
that
arise when designing a robust synchronization phase, considerthe
following scenario. Suppose thatthe set
-L of all live processors entera
syn-chronization phase, and halfway throughit,
another setLt
of processorsstart
up. Since the
processors in .L' have missed a largepart
of the synchronization phase, theywill
not be ableto synchronize
with the other processors.
(This seemsto be
inherentin any conceivable
syn-chronization
protocol.)
There are two possible approachesfor
solvingthis
problem. One isto
try
to
designthe
protocol sothat
the processors in -L detectthe
newly started processorsduring the
synchronization phase. Thenthey
must somehow resynchronizewith
the newlyLet
as electing a lcader) and
it
is difficult
to
detectthe
presenceof
the processorsin -t'
during some of these tasks. A second approach is to allow the processors in -L to ignore the processorsin
tr/
andto
finishtheir
synchronization phase (either synchronized amongst themselves, ornot).
Thenthe
set-tl
of processors inthe
synchronization phase will verylikely
disrupt thenormal operations
of
the processolsin tr'
causingthem
to synchronize
again'
Rut
now thepro."rror. in
,L/will be about halfway
throughtheir
synchronization, whereas the processorsir-,
,t
arejust
starting
synchronization! Our solutionto
this
problem is a combination of thetwo
approaches, and is describedin
thenext
sectionwith
the description ofour
protocol.L.4
Outline
In
Section2
we describeour
newprotocol'
In
Section3
we provethe
key featuresof
ourprotocol,
namely,a
packet generatedat
a
stepin
which no
processorsstart or
stop soon beforeor
afterwill have constant expected delay, and a packet generated
at a stepin
whiclt a processor starts soon before or afterwill have an expected delay of O(n"') steps.
In
Section 4 we showthat
our protocol achieves constant expected packet delay for a fairly general multipleaccess channel model, rvith processors
starting
and stopping'The Protocol
^9:
{0,...,n4o
-
1}\
{n'-
7,2n2-L,3n2
-
1,..
.,nao-r},
be a set of steps, namely, the
first
240 steps, except for the last one of every n2 steps' Then let7
be the tree defined u, inPut"rron
and Srinivasan's protocol, exceptthat
(1)it
is truncatedto
thefirst
nao-
n38 leaves, and(2)
if
a node intheir
tree?
has stepj
in its trial
set, thentlre
corresponding nodein
our tree T has thejth
stepof
^9in
its trial
set.LetIA =
I2na' Now we givean informal
descriptionof
our protocol.
In
the
normalstate a
processormaintains a buffer
B
of
sizen'
uni
an
infinite
queueQ. B
andQ
contain packets to be sent, and when a packet is generatedit
is put
into
B.
For each packet rn€
B
the processolmaintains a variable
trial(rn)
which contains the next step on which the processorwill
attemptto send
rn.
The
steptrial(rn) will
be chosen using Paterson and Srinivasan's protocol(but
modifled as above). The steps
not
in
^9 (i.e., thelast
step of every n2 steps) are usedto
send packetsfrom
Q. At
eachof
these steps, with probability1/(3n),
the processor attemptsto
s"od
th"
first
packetin
Q.
Each processor also maintains a list -D which keeps track of theresults
(eitherafailure"
o, "ro".urr")
of the most recent packet sending attempts fromQ'
upto n2
of them.A processor
goesinto
a synchronizing stateif
a packet has remained in the buffer fot nz steps orif .[ is full
(contaios ,r2 r"rultr)a"a
only contains failures.It
also goesinto
asynchro-nizing state from time
to
time even when these events d.o not occu-r.(It
synchronizesif
it
has been simulating Paterson and. Srinivasan's protocolfor
at least n40 steps, andit
synchronizeswith
probability
n-30 on any given step.)If
the processor does gointo
a synchronizing state'it
transfersall
packets fromB
to
the end of Q.In
the
synchronizing state, a processor could bein one
of
many possible stages, and itsactions depend on the
ftage
that-it
is
in.
It
will always put
any generated packetsinto
thewait
until
the next normal phase to be sent.) The various synchronization stages are as follorvs(a processor goes through these stages
in
order).JAMMING
The processor starting the synchronization jams the channel by sending packetsat
every step.In
this way,it
signals other processorsto start
synchronizing also.FINDING-LEADER
Each processor sends tothe
channelwith
probability
t/n
on each step. Thefirst
processorto
succeed is the leader.ESTABLISHING-LEADER
In this
stage, a processor has decidedit
is the leader, and itjams the channel so no other processor
wiil decide
to
be the leader.SETTING-CLOCK
In
this
stage,a
processor has establisheditself
asthe
leader, and itjams the channel once every 4I4l steps, giving other processors a chance to synchronize
with it.
COPYING-CLOCK In
this stage,
a processor
has decidedit
is not
the
leader, andit
attempts
to copy
the leader clock by polling the channel repeatedlyto
attempt to findthe synchronization signal (namely, the jamming of the channel every
4W
steps by theleader).
Specifically,it
sendsto
the channel withprobability 1/(3n)
on each step, andif
it
succeeds,it
knows thatthe
current step(mod 4I4l)
doesnot correspond to the
leader'sclock.
After
many attempts,it
shouldonly
beleft with
one step (rnod4lt)
that could correspond
to the leader's clock.At
the end of this stage,it
synchronizes its clockto the leader's clock.
WAITING
This stage is used by a processor after COPYING-CLOCKin
order to synchro-nize with the leader's clock. The processor idles during this stage.POLLING
A
processor in this stage is simply "bidingits time" until
it
switches to a normal stage. While doing so,it
attemptsto
send to the channel occasionally(with
probabilitytlQn)
on each
step)in
order
to
detect new processorswhich might
bejoining
thesystem and re-starting
a
synchronizationphase.
If
new processors are detected, the processor re-starts the synchronization phase. Otherwise,it
begins the normal phase of the protocol.The length of each of these stages is very important, both in terms of achieving a high
prob-ability
of synchronization and a high level of robustness. The high probability ofsynchroniza-tion
is achieved by makingthe "preliminary"
stages (i.e.,JAMMING,
FINDINGJEADBR'
and ESTABLISHING-LEADER) of length
O(W)
(this
is long enough to guaranteeall
pro-cessorsin a
normal state will detect a synchronization), andthe
"synchronizing" stages (i.e.SETTING-CLOCK,
COPYING-CLOCK, andWAITING) of
length @(Wn2) (this givespro-cessors enough time to determine the leader's clock modulo 4W,
with
highprobability).
Thehigh level of robustness is achieved by the following properties:
1.
Having the lengths ofthe "preliminary"
and "synchronizing" stages as above,2.
Noticingthat
only the preliminary stages can cause the channelto
be jammed,3.
Noticingthat
the usynchronizing" stages cannot detect a new synchronization occurring,5.
havingthe POLLING
stage be ableto
detect new synchronizations.The
differing lengthsof time for
the
"preliminary",
"synchronizing" andPOLLING
stages, andthe
fact that
only the POLLING
stage could cause another synchronizationto occur'
guarantees
that
bad events as described at the end of Section 1.3 cannot occut'' eveti whenup
to
n
processors are startingat
different times'Whenever a processor joins the Ethernet,
it starts the
protocolwith
state=
SYNCHRONIZING, sync-stage:
JAMMING,
clock=
0, and-t
empty.we
now givethe
details of the protocol'Protocol
At each step do
If
(state=
NORMAL)
call Procedure NormalElse call Procedure Synchronizing
Procedure Normal
If a packet,
m,
is generatedPut
rnin
B
choose
trial(m)
from thetrial set
of the appropriate leaf of?
If
((clock mod n2)=
n2-
1) call Procedure Queue-StepElse cali Procedure NormalSteP
Procedure Normal-SteP
If
(clock>
n4oor
any Packet in Moveall
of the Packets inB has waited
morethan
n7 stePs)BfromBtoQ
Empty
-Lstate +_ SYNCHRONIZING, sync-stage *_
JAMMING,
clock*-
0Else
With
ProbabilitY n-30Move all of the packets in B from
B fo
QEmpty
-Lstatee-SYNCHRONIZING,sync-stage*.JAMMING,clock*_0
OtherwiseIf
more than one packet min B
hastrial(rn) =
clock Send a dummY PacketFor each m
€
B with trial(m)
-
clockChoose a new
trial(rn)
from the
trial
set of the appropriate nodeat
the next level of?
If
exactly one packet in 8,, m', has trial(m)-
clockSend rn
If
rn succeeds, removeit
from B
Else choose a new trial(rn)
from the
trial set
ofthe
appropriate nodeat
the next level of?
Procedure Procedure Queue-Step
With
probability
1/3rlIf
(Q
is empty) Send a dummy packet ElseSend the
first
packetin
QIf the outcome
is
"success", Removethe
packet from QAdd
the outcome of the send to -tOtherwise
Add "failure"
to
LIf
(lrl :
n2
ar.d all of the entries ofL
ate"failure")
Move all of the packets in B
from
B to
Qtrmpty,L
state <- SYNCHRONIZING' sync-stage
*-
JAMMING'
clock'-
0Else clock <- clock
*
1P rocedure Synchronizing
If a packet arrives,
put
it
in Q
If
(sync-stage=
JAMMING)
call Procedure JamElse
If
(sync_stage=
FINDING-LEADER)
call Procedrrre Find-Leadertrlse
If
(sync-stage=
ESTABLISI{ING-LtrADtrR)
call Procedure Establish-Leader ElseIf
(sync-stage=
SETTING-CLOCK)
call Procedure Set-ClockElse
If
(sync-stage=
COPYING-CLOCK)
call Procedure Copy-Clock trlseIf
(sync-stage=
WAITING)
call Procedure Waittrlse
If
(sync-stage=
POLLING)
call Procedure PollProcedure Jam
Send a dummy packet
If
(clock<Wlz
-
1) clock.-
clock+
1Else sync-stage <--
FINDING-LEADER'
clock*-
0Procedure
Findjeader
With
probability
1/nSend a dummy Packet
If
it
succeedssync-stage.-
ESTABLISHING-LEADBR,
clockr-
0If
(clock<
W
-
1) clock <- clock*
LElse
forr'=0to4W-I
possibletime[i] e- Yes
P rocedure Establish-Leader
Send a dummy packet
If
(clock<
2W-
1) clock.-
clock*
1Else sync-stage <-
SETTING-CLOCK,
clock*-
0Procedure Set-Clock
If
(clock=
0 mod 4W)Send a dummy packet
If
(clock< 20Wn2
-
1) clock.-
clock+
1Else sync-stage
*-
POLLII'{G, clock'-
0Procedure Copy-Clock
With
probability
1/(3n)Send a dummY Packet
If
it
succeedspossibletime[clock mod
4W]
<-- NoIf
(clock< 20Wn2
-
1) clock*-
clock+
1Else
If
possibletime[i]=
Yesfor
exactly onei,
clock <--j
trmpty
-LIf
(j
=
0) sYnc-stage*-
POLLING Else sYnc-stage <-WAITING
ElsetrmPtY,L
sync-stage
*-
POLLING,
clock <- 0Procedure Wait
clock <- clock
*
1Procedure Poll
With
Probability
IlQn)
Send a dummy packet
Add
the outcome ofthis
sendto
the end of ,LOtherwise
Add "failure"
to
L2If
(lrl :
n2 ar.d ail of the entries of-t
are"fail")
trmpty
trsync-stage
,-
JAMMING,
clock*-
0Else
If
(clock{
Wn3-
1) clock.-
clock+
1Else
Empty ,L
state <- NORMAL, clock <- 0
3
The
Main
Proof
Suppose
that
rl is sufficiently large and that ?? processors run the protocol. Step 0will
be thestep in which the
first
processor starts theprotocol.
Processorswill
start
and stop (perhaps repeatedly) at certain predetermined times throughout the protocol. We saythat
the sequencc of timesat
which processors start and stop is allowedif
every processor runsfor
at least n33steps each time
it
starts.
Just before any step,l,
wewill
referto
the
processors that arerunning the protocol as liue processors. We will say that the state of the system is normal
if
all
of these plocessols are in state NORMAI. We will saythat
it
is goodif
1.
It
is normal, and2.
fot
someC
1
n4o-
n7, evety processor has clock:
C, and
3. every processor
with
ll,l
>
n'12
has a success inthe
last n2f2 elements of ,L, and4. no packet
in any processor's
buffer has beenin that
buffer for more than n7f2
steps. We saythat
the state is a starti,ng state if the state is good and every clock:
0. We saythat
it
is
synchronizingif
.
every processor has state=
NORMAL, or
has state=
SYNCHRONIZINGwith
either sync-stage=
JAMMING
or sync-stage=
POLLING,
and.
some processor hasstate
:
SYNCHRONIZING
with sync-stage
=
JAMMING
and clock=
0.We say
that
the system synchronizesat
stept
if
it
isin a
normal statejust before step t
and
in
a
synchronizing statejust
after stept.
We saythat
the
synchronizationis
arbitraryif
every processorwith state
=
SYNCHRONIZING, sync-stage=
JAMMING
and clock=
0just
after step,
hadits
clock< nao,
had no packetwaiting
more than nz stepsin its
buffer, and either had l,Ll< n2
or had a successin
.t,
just before step f.
Definition:
The
interlal
starting at any step t is defined to be the period [t, . . . , t + n33-
1] .Definition:
An
interval is said tobe prod,uctiueforagiven
processor if at least n2e/2 packets are sentfrom the
processor's llueue during theinterval, or
the queue is emptyat
some tirneduring
the interval.Definition:
An
intervalis
saidto
belight
for
a given plocessorif
at
most n 17 packets areplaced in the processor's queue during the interval'
Definition:
Stepf
is saidto
be an out-of-sync stepif
either the stateis
normal just before stepl,
but
two
processors have different clocks, orthe
state wasnot
normaljust before any
step in[t-IJn7 +1,...,1].
(Intuitively,
an out-of-synch step is the result of an "ttnsttcc.essfttl" synchronize phase.)Definitionz T
:
n37.procedure
NormalStep
simulatesa slightly
modified version Paterson and Srinivasan'sprotocol
from
[7].
(We refer the reader to [7]for a full
description and analysis of Patersonand Srinivasan's
protocol.)
We callour
sl-ightly modified versionPS'-
PS'is
based on thevariant
of
Paterson and Srinivasan'splotocol
with
fr
:
16,s
=
2
and
r =
B which was describedin [7]. In
P,9/,a is
defined to be k20 (Paterson and Srinivasan usea
smaller o.)Paterson
and
Srinivasan require) < l/so'
However,in
P^9', we require4A
<
1/so'
Inour variant,
b
is
chosen suchthat
b
> 2le\.
Given
our choice
of
constants'P5'catr
oniy
handle smaller valuesof
)i
than
those specifiedin
[7].
The main
difference betrveeupSt
andthe protocol
discussedin
[7]is
that
after
every n2- I
steps'PSl
waits one step, generating inputs,but
not running the Paterson-Srinivasanprotocol' (Any
inputsthat
arriveduring this step are deemed to have arrived after
at
the beginning of the following step, whenp,S/
continues simulatingthe Paterson-srinivasan
protocol.)
Note
that from
any startingstate
until
a synchronization, our system simulatesP5'.
This
impliesthat
our system stopssimulating
P5'
whena
processorstarts
up, since
that
processorwill
immediatelystart
asynchronization. Then
P,9'is
simulated again once astarting
stateis
reached' Lemmas 1and 2 describe the behavior
of
PS'and
are based on a theorem of Paterson and Srinivasan'Lemma
I
Suppose that PStis run
with a{);}r<;<"-dominated
arriual
distributionfor
r {
n4o
steps.
Tiin
the expected, detay of onypo"i"l
that arriue.s is
O(1).
Furthermore, theprobability that any paciet has d.elay more than n7 f
2 is at
most n-6o.proof:
The lemma follows from the proof of Theorem 2of
l7l.
Notethat an
extra factorof
2 inthe
defi.nitionof .\
allows the theoremto
apply
to P.9/
iwith
the
extra step every n2steps).
Lemma
2
suppose that PStis
runwith
a{l;}rs;s,-dorninated
arriual distri'bution forr I
nao stepsand-tiat
a packet arriaesot
proceiso,g
it
step tt 1-r.
Then the etpected delayof
onypoik"t
that arrfues rs O(1).
Further-more,the
probobility that any packet has delay rnorethan n7 f
2 is
at
most n-6o.proof:
Another extra factor of 2in
the definition of)
and the constraint on b ensurethat
the expected number of packets in a node of
the
treeat level
0
(evenwith
the extra packet) can be handledby
the protocol. Thus,this
Lemma follows from Lernma1'
DLemma
B
Giuena rand,om uariable
X
taking on non-negatiue integer ttalues, andtuo
euentsA
andB
ouer the sarne s2t&ce,EIXIAA B]
< DlXlBJlPr(AlB)'
Proof:
Note for any eventC
that Pr(ClB)
2
Pr(CA AIB)
= Pr(ClAn
B)Pr(AlB).
Flomthis
we seethat
F,[X]A^B)
: f
rPr[X:rlAAB]
r)0
r)0
tr
Lemmas 4
to
8 outline the analysis of the normal operation of the synchronization phase of our protocol.Lemma
4
Suppose that the protocolis
run
with a sequence of processor start/stop times inwhich no processor starts or stoqts between steps t and
t*W
.
If the system is
in a synchronizing state just beforestept,
then euery liue processor sets sync-stagelo FINDING-LBADtrR
Tusfbefore some step in the range
{t,.
..,t
+ W}.
Proof:
First
notea processor
can havestate
=
SYNCHRONIZII'{G and sync-stage =JAMMING
for only W f 2 steps. Then note that every processor with state:
SYNCHRONIZING,sync-stage:
POLLING,
and clock<
Wn3-
n2 will set sync-stageto
JAMMING
after atmost
n2 stepsl every processorwith
state
=
SYNCHRONIZING sync-stage=
POLLING,and clock
)
Wn3-
n2
wlIleither
set sync-stageto JAMMING within
n2 steps,or
switchto
state
:
NORMAL
within
n2 steps, and set sync-stageto JAMMING
after
at
most anadditional na steps (since when state
=
NORMAL,
a queue step is taken only once every n2steps); and every processor with state
:
NORMAL
will set sync-stage
to
JAMMING
afterat
most na steps. The lemma followsby noting that
n2+
na<
Wf2, and
that a
processor remainsin sync-stage
=
JAMMING for
Wf2
steps.
DLemma
5
Supposethat
the protocolis run with a sequence
of processor
start/stop
timesin
whichno
processorsstart or
stop
between stepst
andt
+
4W.
If
euery processor setssync-stage: FINDINGJEADER
before some stepin
the range{t,...,t*W},
then with probabili,tyat
leastI -
e-n",
eractly
one
processor Eets sync-stage=
SETTING-CLOCKjust
before some stepin
the ranget +
2W
*
1, . . .,t
+ 4W
and euery other processor setssync-stage
=
COPYING-CLOCKjust before
some step in the ranget
*
W, . . .,t
+
2W .Proof:
First
note
that at
most
one leaderis
elected sinceafter
elected,it
does notallow any
processorsto
access the channelfor 2W
steps.
Also
note
that
no
processorwill
have sync-stage=
FINDINGJEADER
just
before stept
+
2W,
since sync-stage:
FINDINGJEADER
forat
most 17 steps.Suppose
P
is
the last processorto set sync-stage
=
FINDING-LEADER.
Then as long asno
leader has been elected,the
probability
that
P
is
electedat
a given stepis
at
least(tln)(t
- (t|-il)"-L >
tl@n).
Th-usthe probability
that
no
leaderis elected
is at most
(I
-
ll@n))w,
which is at most e-'r". Then the leaderwill
spend2W
stepswith
sync-stage=
ESTABLISHING-LEADER before setting sync-stage
to
SETTING-CLOCK,
while the other processors will directly set sync-stageto
COPYING-CLOCK.
o
Lemma B Suppose
that the protocolis run with
a sequence of processor stctrt/stop times irtwhich,
no
processor startsor
stops between stepsr -
3W
andr I
20W n2'
If
emctly
one':processor s€ts sync-stage
=
SBTTING-CLOCK
just
before stepr
€
{t +
214/,-..,1+
4lI'}
and, euery other proce.ssor sels sync-stage:
COPYING-CLOCK
just before
sonte st,epin
tlr'e range r-
JW, . . . , r,
then with probability at least |-
4W ne-".
all processors set sync-stage:
POLLING with
clock=
0
just before stepr
l20Wn2.
Proof:
The statementin
the lemma is clearly truefor
the processorthat
sets sync-sta$e:
StrTTING-CLOCK.
Supposethat P
is
someother
processor. For eachi
in
the rangc0
(
i <
4W,
if
P's
clock
:
f
mod 4tr4l whenthe
leader'sclock
=
0 mod 414l, possibletime[i]will
beyes.
If
not,
p
has at leastl(20wn2
-zw)l@14/)J
chancesto set possibletime[i] to
No, i.e.,
it
has that many chancesto poll when
its
clock
:
i mod
4W
andthe
leader has already set sync-stage-
SETTING-CLOCK.
Now, 5n2- i
<
l(20wn2
-
3w)l(414/)i.
Theprobability
that P
is successful on a given step isat
least3(#)'
and so the probability thatit
is
unsuccessfulin
5n2-
1 stepsis at
most(t
-
-z-\s""-r
I
e-n.
The lemma follows bysumming
failure
probabilities overall
processors andmoduli
of4w.
n
Lemma
7
Suppose that the protocolis run with a sequence
of processor
start/stop
tintesin
whichno
processors startor
stop between stepsr
and
r *
Wn3.
If
all processors sel
sync-stage:
POLLING
with clock=
0just
before stepr
then with probabilityat
least|
-147ra"-"ito
all
processors sel state=
NORMAL
and, clock=
0
just before stepr
*
I'I/r23.proof:
Say a sequence of n2f2 stepsis
bad,for processor Pif
P does
not
have a successfultransmission on any step in the sequence. Then
the probability
that a given processor
P
is thefirst to
set sync-stage=
JAMMING
is at most theprobability that
it
has a bad sequenceof
n2f2
steps, assumingall
other processolsstill
have sync-stage: POLLING' Thisis
atmost
the probability that
it
either doesn't send,or is
blocked on each step of the sequence, which is|
1
r /t\Y"12 (-
21n2lz
L'
-#-#(;)l'-
=('-
#)
<"-n/'lo
The
lemma followsfrom
summing overall
steps(actually this overcounts
the
number ofsequences
of
n2f2
steps) andall
processors.
trLemma
8
Suppose thatthe protocol
is run with o sequence
of processor
start/stop
ti'mesin
whichno
processor startsor
stops between stepst
andt
*
13n7.
If
the sy.stemis
in
asynchronizi,ng state just before step
t,
then with probability at least L-2Wnae-nlro
,
there is ati
in the
*ng"
{t
+'L2n7 , . ..,t
+
il"r1
such thatit
is
in
the starting
state just before step tt 'Proof:
The lemma follows from Lemmas 41 5r 6 and7.
trLemmas
9
to
14outline
the analysis
of the
robustnessof the
synchronization phase'Lemma
g
shows that nomatter what
statethe
systemis
in
(i.e., possibly normal, possiblyin
the
middle
of a
synchronization),if
some processorstarts
a
synchronization (possibly becauseit
just
started), then
within Wf
2
steps, every processorwill
be
in
an early partof
the
synchronization phase.Then
Lemma 10 shows that withhigh
probability,within
areasonable amount
of
time,
all processors
will
be beyondthe
stages where they would jamthe
channel, and furthermore, thereis a
low probability
of
any going backto those
stages(i.e., a low probability of any synchronization
starting).
Finally, Lemma 11 showsthat
soonall
processorswill be in
thepolling
stage.At
this
point, as shown
in
Lemma 12,they
will eitherall
proceed into the normal state, orif a synchronization is started,
theywill
all detectit
and with high probability proceedinto
a good state as in Lemma B.Note
that
these lemmas requirethe
assumptionthat
no processors startor
stop.
Thisis because
they
are used for showingthat
the
system returnsto
a
normal statefrom
anysituation,
evenfrom
a badsituation
such asa
processorjust
having startedin
the middleof
a synchronization phase.If another processor
starts before the system returnsto
normal,then we would again use these lemmas
to
showthat
the
systemwill
returnto
normal withina reasonable amount of time after
that
processor started.Lemma
9
If
the protocol is run and some processor sels sync-stage=
JAMMING just
beforestep
t,
and that processor does not stopforWf
2 steps, then there isat'
in the
ranget,...,tt
(W12)
suchthat
just before steptt, no processor hos state=
NORMAL,
and euerg processorthat has sync-stage
=
POLLING
hcs clockSW12.
Proof:
Bvery processorP
that has
state
:
NORMAL or sync-stage
:
POLLINGjust
before step
t
will detect the channel being
jammed and set state=
SYNCHRONIZING andsync-stage:JAMMING
justbeforesomestepintheranget*1,...,t*(W12).
TheLemma follows.Lemma
IO
Suppose that the protocolis run with
a
sequence of processorstart/stop
timesin
whichno
processor starts or stops between stepst
andt
*
SnW.
If,
just
before step t,no
processor has state=
NORMAL
and euery processor uith sync-stage=
POLLING
hasclock
(
Wf2,
then,
with probabilityat
least1-
|Wnze-nlro,
thereis
a
tt
in
the
ranget,.
..,t
*
5nW
such that just before step tt,
each processor has state=
SYNCHRONIZINGwith
sync-stage sel toSETTING-CLOCK, COPYING-CLOCK,
WAITING,
or
POLLING. Furthermore,if
a processor has sync-stage=
POLLING,
it
has clock(
SnW*Wl2
andeither
it
has clock(
n2 f 2,or
it
has had a successin the last
n2f2
steps.Proof:
Saya
processoris
calm at a given stepif
it
has state=
SYNCHRONIZING andsync-stage set to SETTING-CLOCK,
COPYING-CLOCK, WAITING, or POLLING
andif
sync-stage
=
POLLING,
thenits
clockis at
mostWl2+|nW.
Notethat
each processoris
uncalmfor
at
most 4W stepsin
tr...,t*\nW,
so thereis a
sequence ofW
steps int,.
. .,t
*
1nW
in which every processor
iscalm. Let
t'
be the random variable denoting the(r'/Z
f
l)st
stepin
this sequence.Sry a sequence of n2f2steps is bad,for aprocessor
P
if
P
has sync-stage=
POLLINGjust
before every step
in
the,"qo"n.",
and all ofits
transmissions during the sequence are blocked by other calm processors. The probabilitythat
a processor with sync-stage=
POLLING addsa failure
to
.t
on a given step, either due to nottransmitting
or due to being blocked by a calm processor,is at
most L-
Ll$n) + (t/(32))(1/3)
=
I
-
2lQn).
Thus, theprobability
that
agirr"o ,"qrr"nce of n2 f
2 stepsis
bad for a given. processor is at most-(t
-
Zl@n))"2 /2<
"-n/to .
Thor,
with
probability at least 1-
5Wn2e-"/1o, no sequence of n2 f 2 steps in tr. . .,,t*
\nW
is
badfor
any processor. Inparticular, the
sequence of n2f2
steps precedingt'
is
not bad
for
any processor, so any processor that has syncJtage=
POLLINGjust before step
t'
with
clock
> n2
f2has a successin
the sequence of. n2 f 2 steps precedingt/.
trLemma
ll
Suppose thatthe
protocol isrun
with a sequence of processorstart/stop
times inwhiclt
no
processor startsor
stops between stepst
and tl
SnW*
(Wl2)
*
20Wn2'
IJ sonteprocessor sefs syncstage
=
JAMMING
just before stept
thenwith
probabilitEat least
|
*
2IWrt"-.lto,
ihereis
at,
in the
ranget,...,t*5nW
+(W12)*20Wn2
suchthat
just beforestep tt
,
each processor has sync-stage:
POLLING 'proof:
We know by Lemmas 9 and 10that, with probability
at least1-bWn2e-'l10,
thereis
ar
in
the
ranget,...,t *
'nw
+
(wl2),
suchthat
just before step
r,
each processor hasstate
=
SYNCHRONIZING and sync-stage set toSETTING-CLOCK,
COPYING-CLOCK'WAITING, or POLLING.
Furthermore,if
a processor has sync-stage=
POLLING,
it
has a clockS
SnW*W12.
and eitherit
has clockS n2f2,or
it
has had a successfulpoll
in the
last
n2/2 polls.Note now that unless a processor sets sync-stage
=
JAMMING in the
next 20IAn2 steps,there
will
be
a
stepl/
such that each plocessor has sync-sta$e=
POLLING'
But to
setsync-stage
:
JAMMING,
a processorwith sync-stage
:
POLLING
must be unsuccessful inall transmission
attemptsduring
some n2 f2
consecutivesteps'
Fora single plocessor
and"
,i"Sf"
setof
n2 f2
consecutive steps,the probability
of this is at
most
"-n/ro
(as in thcproof"of
t"m-u
Z).
Forall
processorsand
all possible sets of n2f2
consecutive steps itr;,.
..,r
*
20Wn2,ihi,
probubility is boundedby 2yWn3e-nllo.
The Lemmafollows'
trLemma
'J-2 Suppose that the protocolis run
with
a sequence
of
processor-start/stop
tintesin
whichno
processor startsor
stops between stepst
andt
+
Ian3
+
13n7.
If
the sy.stentis
in
a
statein
which euery processor has state= N}RMAL
or sync-stage
=
POLLING just before stept
then, with probabilityat
least 7-
2Wnae-nlto,
thereis
a
tt
in
the range"r,
. . .
,i
+ Wn{
+
lZnT suchtiat
the systemis
i,na
normal statejust
before step tt 'Proof:
If
no
processor sets sync-stage: JAMMINGduring
steps{t,
...,t*Wn3 -
t}
then the system reaches a normal state before step t +Wn3'Otherwise, suppose
that
someprocessor sets sync-stage
=
JAMMING just
before step f/'I
t*
w
n3-
1. By Lemma B,with
probability
rt
iuurtl])1a7n+u'tro
the system will enter a starting stateby
step f"*
r3n7 ' trObservatio
n
13 Suppose
that the protocolis run
uith
a sequence
of
processor start/stoptimes
in
which nop*""rror
starts betueen stepst
andt+2IW
n2-1.
Suppose that no processor sefs sync-stage=
JAMMING
d,uri,ngstepst,...,t*2LWn2
-L.
Then euery processor has state:
NORMAL
or syncrtage=
POLLING
just
before stept
*
2LWn2.Lemma L4 Suppose
that the protocolis
r:unuith a sequence of
processorstart/stop
times in whichno proces1or starts
or
stops between stepst.and t
+
n8. Giaen
any system statejust
before step
t,
w;th
probabitityat
least L-\Wnai-"/Lo,
there is a tt in the ftrnge{t,'
' ', t + n8}such that the system
is
in a
normal stateiust
before stept''
Proof:
The Iemma followsfrom
Lemma 12, Observation 13 and Lemma1l-'
trLemma
lb
through
Theorem19
showthat
if
the
protocol
is run with
a
{);}r5;3"-dominated packet arrivals
distribution
then the systemis
usuallyin a good
state,(i'e''
syn-chronized and runningthe P.9' protocol),
and thusthe
expectedtime
that packets
wait
inthe buffer is constant.
Lemma L5 Suppose
that the protocolis run with a
sequence of processorstart/stop
timesin
whichno processor
startsor
stopsduring
stepst,...,t*n31f4-l.
Giuen any system state just before stept,
with y2robability at leastI
-
6Wnae-nl1o, thereis a
tt
in the range
{t,...
,t
+
nsrf4}
such that the system isin a
starting
statejust before
step tt.Proof:
By
Lemma 14,no
matter what
state
the
systemis
in
at
stepl,
rvith
proba-bility
at
least 1
-
SWnae-nllo
it *ill
be
in
a
normal state
within
n8
steps.
Then
theprobability that
it
doesn't entera synchronizing
state
within n31/B steps
is at
most (1-n-3o)(n31 /8)-(""n /e)
<
"-nlro.
Thenby
Lemma B, onceit
enters a synchronizing state, withprobability
l-2Wnae-nlro
il
will
be in a starting state within 1327 steps. The lemma followsdirectly from
summing failure probabilittes.Lemma
LG Suqtpose that the protocolis run with a
sequence of processorstart/stop
timesin
which no processor startsor
stops between stepst
andt
+
n31-
2n8.
Giuen any system statejust
before stept,
with probabitityat
leastI
-
4Wnae-"11o there isa
tt
in
the range{t,.
..,t +
n3r-
2nt} such
that the sgstemis
in a synchronizing state
just
before step tt.Proof:
From Lemma 14,with probability
at
leastI
-
SWnae-nl7o, the system rvill be ina normal state
at
some time stepsin
{t,.
. . t+
n8}.
Once the system isin
a normal state, onevery step excepr one
out
of every n2 steps, withprobability
at least
n-so
a processorwill
switchto
a synchronizing s^tate.^Theprobability
ofthis not
happeningin
thenext
n3r-3n8
steps is at most(1-
nao;{"", -3n6-n2s) Ss-nlz.
The lemma follows from summing the failureprobabilities.
trLemma
L7
Letr
be a non-negatiue integer less than n4o-
n7.
Suppose that the protocol isrun
with
o {);}r<,<"
-dominatedarriual distribution
anda sequence
of processor start/stop timesin
which,i
pror"ttor starts
or
stops between stepst
andt +
r.
If
the systemis
in
astarting
state just before stept
then with probabitityat least
I
-
(13.5)n-22, the systemis
in a good statejust
before stept
{
r.
Proof:
Consider the following experimentin
Figure
1,in
whichthe
protocolis
startedin
a
starting
statejust
beforestep
t
and
run
accordingto
the experiment'
If
noneof
{FAILI,...,
FAIL4}
occurs then the system isin
a good statejust
before stept*r.
Asin
theproof
of
Lemma 6, the probabiJitythat a given element
of
,Lis
"success" isat
\east 2f (9n), so theprobability
that
FAIL1 occurs isat
mostrne-nle.
By
Lemma 1-, and the factthat at
most nio
fW
starting states occurin
the experiment (soPSl
is started at most n4olW
times),the probability
that
FAIL2 occulsis
at
most (naolW)n-6o
-
n-24. In
the experiment, theclocks of
the
processors never reach nao.
$.the
stateis
normal,all
processors have the samevalue of c, every processor with
ll,l
>n212
has a successin
the \ast n2f2 elements of-t,
andevery processor has no packet that has waited more
than
n7 f2
steps,,then the
probabilitythat
a given processor sets state=
SYNCHRONIZING on a given step is at mostn-il.
Thus,the
probability
that FAILS occurs is
at most L3n-22.By Lemma 8,
the probabi.lity of failingto
successfully restart after a given syirchronization state isat
most 2147na"-n/10. Hence, theprobability of
FAIL4 occurring is at most2r147na"-n/to-
trLemma L8 Suppose that
the protocol isrun
wi,th a{};}rS;S"-dominated
arriual distribution anda
sequenceof
processorstart/stop
timesin
uhi,ch no processor startsor stops
betweeni<-t
resyncing
*-
false Do foreverSimulate a step of the Protocol
If
(resyncing
:
false)If some packet has rvaited more
than
nz f 2"teps
F'AIL2
If some processor
with
ll,l
> n212 has no
success in the lastn2f2
elements of -LFAILl
If
the new state of the systemis
synchronizingIf(i>ttr-13?27)
FAIL3EIse
resyncing
<-
truej *o
Else
If
(the new state of the system is a starting state)resyncing
+-
falsej*jtr
If
((j >
L3n7) and (resyncittg-
true))
PAIL4i:i*1
If(i>t+r)succtrED
Figure 1: Experiment