read-modify-write
In computer science, read–modify–write is a class of atomic operations (such as test-and-set, fetch-and-add, and compare-and-swap) that both read a memory location and write a new value into it simultaneously, either with a completely new value or some function of the previous value. These operations prevent race conditions in multi-threaded applications. Typically they are used to implement mutexes or semaphores. These atomic operations are also heavily used in non-blocking synchronization. Read–modify–write instructions often produce unexpected results when used on I/O devices, as a write operation may not affect the same internal register that would be accessed in a read operation. This term is also associated with RAID levels that perform actual write operations as atomic read–modify–write sequences. Such RAID levels include RAID 4, RAID 5 and RAID 6.
References
No reference rows published for this article.
Cite this article
MLA
"read-modify-write." encyclopegia.org, 2026, https://encyclopegia.org/wiki/read-modify-write. Accessed 24 November 2026.
Chicago
"read-modify-write." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/read-modify-write.
APA
encyclopegia.org. (2026). read-modify-write. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/read-modify-write
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| P279 | Q513932 | Wikidata |
| P1269 | Q9135 | Wikidata |
| P6366 | 37918660 | Wikidata |
| P646 | /m/0dtz4t | Wikidata |