3 ms·
And on your computer, your cpu is doing a lot of stuff during that atomic operation even cutting it in smaller parts...
by ta988 5y ago
And on your computer, your cpu is doing a lot of stuff during that atomic operation even cutting it in smaller parts...
- thaumasiotes 5y agoThere 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.