What is Atomicity?
- by James Jeffery
I'm really struggling to find a concrete, easy to grasp, explanation of Atomicity.
My understanding thus far is that to ensure an operation is atomic you wrap the critical code in a locker. But that's about as much as I actually understand. Definitions such as the one below make no sense to me at all.
An operation during which a processor can simultaneously read a location and write it in
the same bus operation. This prevents any other processor or I/O device from writing or
reading memory until the operation is complete.
Atomic implies indivisibility and irreducibility, so an atomic operation must be
performed entirely or not performed at all.
What does the last sentence mean? Is the term indivisibility relating to mathematics or something else?
Sometimes the jargon with these topics confuse more than they teach.