<s>
In	O
distributed	B-Architecture
computing	I-Architecture
,	O
the	O
bully	B-Operating_System
algorithm	I-Operating_System
is	O
a	O
method	O
for	O
dynamically	O
electing	B-Operating_System
a	O
coordinator	O
or	O
leader	O
from	O
a	O
group	O
of	O
distributed	O
computer	O
processes	B-Operating_System
.	O
</s>
<s>
The	O
process	O
with	O
the	O
highest	O
process	O
ID	O
number	O
from	O
amongst	O
the	O
non-failed	O
processes	B-Operating_System
is	O
selected	O
as	O
the	O
coordinator	O
.	O
</s>
<s>
processes	B-Operating_System
may	O
fail	O
at	O
any	O
time	O
,	O
including	O
during	O
execution	O
of	O
the	O
algorithm	O
.	O
</s>
<s>
there	O
is	O
a	O
failure	O
detector	O
which	O
detects	O
failed	O
processes	B-Operating_System
.	O
</s>
<s>
message	O
delivery	O
between	O
processes	B-Operating_System
is	O
reliable	O
.	O
</s>
<s>
If	O
has	O
the	O
highest	O
process	O
ID	O
,	O
it	O
sends	O
a	O
Victory	O
message	O
to	O
all	O
other	O
processes	B-Operating_System
and	O
becomes	O
the	O
new	O
Coordinator	O
.	O
</s>
<s>
Otherwise	O
,	O
broadcasts	O
an	O
Election	O
message	O
to	O
all	O
other	O
processes	B-Operating_System
with	O
higher	O
process	O
IDs	O
than	O
itself	O
.	O
</s>
<s>
If	O
receives	O
no	O
Answer	O
after	O
sending	O
an	O
Election	O
message	O
,	O
then	O
it	O
broadcasts	O
a	O
Victory	O
message	O
to	O
all	O
other	O
processes	B-Operating_System
and	O
becomes	O
the	O
Coordinator	O
.	O
</s>
<s>
If	O
receives	O
an	O
Election	O
message	O
from	O
another	O
process	O
with	O
a	O
lower	O
ID	O
it	O
sends	O
an	O
Answer	O
message	O
back	O
and	O
if	O
it	O
has	O
not	O
already	O
started	O
an	O
election	O
,	O
it	O
starts	O
the	O
election	O
process	O
at	O
the	O
beginning	O
,	O
by	O
sending	O
an	O
Election	O
message	O
to	O
higher-numbered	O
processes	B-Operating_System
.	O
</s>
<s>
The	O
safety	B-Application
property	I-Application
expected	O
of	O
leader	B-Operating_System
election	I-Operating_System
protocols	O
is	O
that	O
every	O
non-faulty	O
process	O
either	O
elects	O
a	O
process	O
,	O
or	O
elects	O
none	O
at	O
all	O
.	O
</s>
<s>
Note	O
that	O
all	O
processes	B-Operating_System
that	O
elect	O
a	O
leader	O
must	O
decide	O
on	O
the	O
same	O
process	O
as	O
the	O
leader	O
.	O
</s>
<s>
This	O
is	O
true	O
because	O
if	O
it	O
were	O
n't	O
,	O
there	O
are	O
two	O
processes	B-Operating_System
and	O
such	O
that	O
both	O
sent	O
the	O
Coordinator	O
(	O
victory	O
)	O
message	O
to	O
the	O
group	O
.	O
</s>
<s>
We	O
have	O
a	O
contradiction	O
,	O
and	O
hence	O
our	O
initial	O
assumption	O
that	O
there	O
are	O
two	O
leaders	O
in	O
the	O
system	O
at	O
any	O
given	O
time	O
is	O
false	O
,	O
and	O
that	O
shows	O
that	O
the	O
bully	B-Operating_System
algorithm	I-Operating_System
is	O
safe	O
.	O
</s>
<s>
Liveness	B-Application
is	O
also	O
guaranteed	O
in	O
the	O
synchronous	O
,	O
crash-recovery	O
model	O
.	O
</s>
<s>
If	O
it	O
does	O
not	O
recover	O
before	O
the	O
set	O
timeout	O
on	O
lower	O
ID	O
processes	B-Operating_System
,	O
one	O
of	O
them	O
will	O
become	O
leader	O
eventually	O
(	O
even	O
if	O
some	O
of	O
the	O
other	O
processes	B-Operating_System
crash	O
)	O
.	O
</s>
<s>
Assuming	O
that	O
the	O
bully	B-Operating_System
algorithm	I-Operating_System
messages	O
are	O
of	O
a	O
fixed	O
(	O
known	O
,	O
invariant	O
)	O
sizes	O
,	O
the	O
most	O
number	O
of	O
messages	O
are	O
exchanged	O
in	O
the	O
group	O
when	O
the	O
process	O
with	O
the	O
lowest	O
ID	O
initiates	O
an	O
election	O
.	O
</s>
