<s>
Release	B-General_Concept
consistency	I-General_Concept
is	O
one	O
of	O
the	O
synchronization-based	O
consistency	B-General_Concept
models	I-General_Concept
used	O
in	O
concurrent	B-Architecture
programming	I-Architecture
(	O
e.g.	O
</s>
<s>
in	O
distributed	B-Operating_System
shared	I-Operating_System
memory	I-Operating_System
,	O
distributed	B-General_Concept
transactions	I-General_Concept
etc	O
.	O
</s>
<s>
In	O
modern	O
parallel	O
computing	O
systems	O
,	O
memory	B-General_Concept
consistency	I-General_Concept
must	O
be	O
maintained	O
to	O
avoid	O
undesirable	O
outcomes	O
.	O
</s>
<s>
Strict	O
consistency	B-General_Concept
models	I-General_Concept
like	O
sequential	B-General_Concept
consistency	I-General_Concept
are	O
intuitively	O
composed	O
but	O
can	O
be	O
quite	O
restrictive	O
in	O
terms	O
of	O
performance	O
as	O
they	O
would	O
disable	O
instruction	B-Operating_System
level	I-Operating_System
parallelism	I-Operating_System
which	O
is	O
widely	O
applied	O
in	O
sequential	B-Architecture
programming	I-Architecture
.	O
</s>
<s>
To	O
achieve	O
better	O
performance	O
,	O
some	O
relaxed	O
models	O
are	O
explored	O
and	O
release	B-General_Concept
consistency	I-General_Concept
is	O
an	O
aggressive	O
relaxing	O
attempt	O
.	O
</s>
<s>
Sequential	B-General_Concept
consistency	I-General_Concept
can	O
be	O
achieved	O
simply	O
by	O
hardware	O
implementation	O
,	O
while	O
release	B-General_Concept
consistency	I-General_Concept
is	O
also	O
based	O
on	O
an	O
observation	O
that	O
most	O
of	O
the	O
parallel	O
programs	O
are	O
properly	O
synchronized	O
.	O
</s>
<s>
In	O
release	B-General_Concept
consistency	I-General_Concept
model	O
,	O
the	O
action	O
of	O
entering	O
and	O
leaving	O
a	O
critical	B-Operating_System
section	I-Operating_System
are	O
classified	O
as	O
acquire	O
and	O
release	O
and	O
for	O
either	O
case	O
,	O
explicit	O
code	O
should	O
be	O
put	O
in	O
the	O
program	O
showing	O
when	O
to	O
do	O
these	O
operations	O
.	O
</s>
<s>
In	O
general	O
,	O
a	O
distributed	B-Operating_System
shared	I-Operating_System
memory	I-Operating_System
is	O
release	O
consistent	O
if	O
it	O
obeys	O
the	O
following	O
rules	O
:	O
</s>
<s>
The	O
acquire	O
and	O
release	O
accesses	O
must	O
be	O
processor	B-General_Concept
consistent	I-General_Concept
.	O
</s>
<s>
If	O
the	O
conditions	O
above	O
are	O
met	O
and	O
the	O
program	O
is	O
properly	O
synchronized	O
(	O
i.e.	O
,	O
processors	O
implement	O
acquire	O
and	O
release	O
properly	O
)	O
,	O
the	O
results	O
of	O
any	O
execution	O
will	O
be	O
exactly	O
the	O
same	O
as	O
they	O
would	O
have	O
been	O
executed	O
following	O
sequential	B-General_Concept
consistency	I-General_Concept
.	O
</s>
<s>
A	O
lock	B-Operating_System
release	I-Operating_System
can	O
be	O
considered	O
as	O
a	O
type	O
of	O
release	O
synchronization	O
.	O
</s>
<s>
Two	O
threads	O
intend	O
to	O
enter	O
a	O
critical	B-Operating_System
section	I-Operating_System
and	O
read	O
the	O
most	O
recent	O
value	O
of	O
,	O
then	O
exit	O
the	O
critical	B-Operating_System
section	I-Operating_System
.	O
</s>
<s>
The	O
code	O
shows	O
that	O
thread	O
0	O
first	O
acquires	O
the	O
lock	O
and	O
enters	O
the	O
critical	B-Operating_System
section	I-Operating_System
.	O
</s>
<s>
In	O
that	O
case	O
,	O
only	O
one	O
thread	O
can	O
be	O
in	O
the	O
critical	B-Operating_System
section	I-Operating_System
at	O
a	O
time	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
synchronization	O
itself	O
has	O
ensured	O
that	O
the	O
successful	O
lock	O
acquisition	O
at	O
P1	O
occurs	O
after	O
lock	B-Operating_System
release	I-Operating_System
by	O
P0	O
.	O
</s>
<s>
However	O
,	O
the	O
code	O
in	O
critical	B-Operating_System
section	I-Operating_System
can	O
not	O
be	O
issued	O
prior	O
to	O
the	O
lock	O
acquisition	O
is	O
complete	O
because	O
mutual	O
exclusion	O
may	O
not	O
be	O
guaranteed	O
.	O
</s>
<s>
Post-wait	O
synchronization	O
is	O
another	O
implementation	O
form	O
of	O
release	B-General_Concept
consistency	I-General_Concept
.	O
</s>
<s>
Lazy	O
release	B-General_Concept
consistency	I-General_Concept
is	O
a	O
further	O
optimization	O
of	O
release	B-General_Concept
consistency	I-General_Concept
.	O
</s>
<s>
This	O
case	O
shows	O
when	O
write	O
propagation	O
is	O
performed	O
on	O
a	O
cache	O
coherent	O
system	O
based	O
on	O
the	O
release	B-General_Concept
consistency	I-General_Concept
model	O
.	O
</s>
<s>
The	O
second	O
image	O
displays	O
what	O
is	O
the	O
case	O
when	O
lazy	O
release	B-General_Concept
consistency	I-General_Concept
is	O
applied	O
.	O
</s>
<s>
"	O
TreadMarks	O
"	O
is	O
an	O
actual	O
application	O
of	O
lazy	O
release	B-General_Concept
consistency	I-General_Concept
.	O
</s>
<s>
Lazy	O
release	B-General_Concept
consistency	I-General_Concept
can	O
outperform	O
release	B-General_Concept
consistency	I-General_Concept
in	O
certain	O
cases	O
.	O
</s>
<s>
Release	B-General_Concept
consistency	I-General_Concept
requires	O
more	O
from	O
the	O
programmers	O
compared	O
to	O
weak	O
ordering	O
.	O
</s>
<s>
Similar	O
to	O
weak	O
ordering	O
,	O
Release	B-General_Concept
consistency	I-General_Concept
allows	O
the	O
compiler	O
to	O
freely	O
reorder	O
loads	O
and	O
stores	O
except	O
that	O
they	O
cannot	O
migrate	O
upward	O
past	O
an	O
acquire	O
synchronization	O
and	O
cannot	O
migrate	O
downward	O
past	O
a	O
release	O
synchronization	O
.	O
</s>
<s>
However	O
,	O
the	O
flexibility	O
and	O
performance	O
advantage	O
of	O
Release	B-General_Concept
consistency	I-General_Concept
comes	O
at	O
the	O
expense	O
of	O
requiring	O
synchronization	O
accesses	O
to	O
be	O
properly	O
identified	O
and	O
identified	O
as	O
acquires	O
and	O
releases	O
.	O
</s>
<s>
For	O
processor	B-General_Concept
consistency	I-General_Concept
,	O
all	O
processes	O
see	O
writes	O
from	O
each	O
processor	O
in	O
the	O
order	O
they	O
were	O
initiated	O
.	O
</s>
<s>
Compared	O
to	O
processor	B-General_Concept
consistency	I-General_Concept
,	O
release	B-General_Concept
consistency	I-General_Concept
is	O
more	O
relaxed	O
because	O
it	O
does	O
not	O
enforce	O
the	O
ordering	O
between	O
stores	O
that	O
happens	O
in	O
processor	B-General_Concept
consistency	I-General_Concept
.	O
</s>
