Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Computer Science · Glosario

¿Qué es Read-modify-write operation, compare-and-swap, acquire and release ordering?

También llamado: read-modify-write operation · compare-and-swap · acquire ordering · release ordering

Definition 13.10 University Computer Science — Year 3 · Capítulo 13 — Concurrency: Deadlock, Monitors and Lock-Free Structures

A read-modify-write operation reads a location and writes it in one atomic operation, as atomic_fetch_add does. Compare-and-swap (CAS) is the read-modify-write that, given a location, an expected value and a new value, writes the new value only if the location holds the expected one, and reports whether it did. A load with acquire ordering keeps every later read and write of its thread after it; a store with release ordering keeps every earlier read and write of its thread before it. A thread whose acquire load reads the value of another thread’s release store sees all the writes that thread made before the store.

Leer en el capítulo →