An atomic memory operation is a read, write, or read-modify-write action on a memory location that is guaranteed to execute as a single, indivisible unit relative to all other threads or processes in the system. This indivisibility, often enforced by hardware-level CPU instructions like compare-and-swap (CAS) or load-link/store-conditional (LL/SC), ensures that no other concurrent operation can observe or interfere with an intermediate, partially-completed state. Atomicity is the foundational property required to implement mutexes, semaphores, and lock-free data structures without race conditions.
