<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
read	B-Operating_System
–	I-Operating_System
modify	I-Operating_System
–	I-Operating_System
write	I-Operating_System
is	O
a	O
class	O
of	O
atomic	B-General_Concept
operations	I-General_Concept
(	O
such	O
as	O
test-and-set	B-Operating_System
,	O
fetch-and-add	B-Operating_System
,	O
and	O
compare-and-swap	B-Operating_System
)	O
that	O
both	O
read	O
a	O
memory	B-General_Concept
location	I-General_Concept
and	O
write	O
a	O
new	O
value	O
into	O
it	O
simultaneously	O
,	O
either	O
with	O
a	O
completely	O
new	O
value	O
or	O
some	O
function	O
of	O
the	O
previous	O
value	O
.	O
</s>
<s>
These	O
operations	O
prevent	O
race	B-Operating_System
conditions	I-Operating_System
in	O
multi-threaded	O
applications	O
.	O
</s>
<s>
Typically	O
they	O
are	O
used	O
to	O
implement	O
mutexes	B-Operating_System
or	O
semaphores	B-Operating_System
.	O
</s>
<s>
These	O
atomic	B-General_Concept
operations	I-General_Concept
are	O
also	O
heavily	O
used	O
in	O
non-blocking	B-Operating_System
synchronization	I-Operating_System
.	O
</s>
<s>
Maurice	O
Herlihy	O
(	O
1991	O
)	O
ranks	O
atomic	B-General_Concept
operations	I-General_Concept
by	O
their	O
consensus	B-Operating_System
numbers	O
,	O
as	O
follows	O
:	O
</s>
<s>
It	O
is	O
impossible	O
to	O
implement	O
an	O
operation	O
that	O
requires	O
a	O
given	O
consensus	B-Operating_System
number	O
with	O
only	O
operations	O
with	O
a	O
lower	O
consensus	B-Operating_System
number	O
,	O
no	O
matter	O
how	O
many	O
of	O
such	O
operations	O
one	O
uses	O
.	O
</s>
<s>
Read	B-Operating_System
–	I-Operating_System
modify	I-Operating_System
–	I-Operating_System
write	I-Operating_System
instructions	O
often	O
produce	O
unexpected	O
results	O
when	O
used	O
on	O
I/O	B-General_Concept
devices	I-General_Concept
,	O
as	O
a	O
write	O
operation	O
may	O
not	O
affect	O
the	O
same	O
internal	O
register	B-General_Concept
that	O
would	O
be	O
accessed	O
in	O
a	O
read	O
operation	O
.	O
</s>
<s>
This	O
term	O
is	O
also	O
associated	O
with	O
RAID	B-Architecture
levels	O
that	O
perform	O
actual	O
write	O
operations	O
as	O
atomic	B-General_Concept
read	B-Operating_System
–	I-Operating_System
modify	I-Operating_System
–	I-Operating_System
write	I-Operating_System
sequences	O
.	O
</s>
<s>
Such	O
RAID	B-Architecture
levels	O
include	O
RAID	B-Architecture
4	O
,	O
RAID	B-Architecture
5	O
and	O
RAID	B-Architecture
6	O
.	O
</s>
