2 ms·
There are two major uses of the term "atomic" in CS. The sense is either that of database transactions, in which either everything happens together or nothing h
by thaumasiotes 6y ago
There are two major uses of the term "atomic" in CS. The sense is either that of database transactions, in which either everything happens together or nothing happens at all, or that of concurrency, in which... really, it's the same thing, but with a focus on whether an intermediate state can be visible from another thread/process, as opposed to whether an intermediate state can be written to persistent media. An atomic operation is one in which, whatever method you use to observe the affected state, you will only see the state from before the operation begins or the state from after it completes.
It doesn't matter whether the CPU does the operation by magic or by some physical process involving the passage of time; that's not part of the concept. The operation is not divisible; it isn't possible for part of it to occur.