What is Atomicity?

Posted by James Jeffery on Programmers See other posts from Programmers or by James Jeffery
Published on 2014-05-24T12:11:03Z Indexed on 2014/05/26 22:00 UTC
Read the original article Hit count: 343

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.

© Programmers or respective owner

Related posts about c#

Related posts about multithreading