Questions tagged [atomicity]

In concurrent programming, an operation (or set of operations) is atomic, linearizable, indivisible or uninterruptible if it appears to the rest of the system to occur instantaneously. Atomicity is a guarantee of isolation from concurrent processes. Additionally, atomic operations commonly have a succeed-or-fail definition — they either successfully change the state of the system, or have no visible effect.

In concurrent programming, an operation (or set of operations) is atomic, linearizable, indivisible or uninterruptible if it appears to the rest of the system to occur instantaneously. Atomicity is a guarantee of isolation from concurrent processes. Additionally, atomic operations commonly have a succeed-or-fail definition — they either successfully change the state of the system, or have no visible effect.

Atomicity is commonly enforced by mutual exclusion, whether at the hardware level building on a cache coherency protocol, or the software level using semaphores or locks. Thus, an atomic operation does not actually occur instantaneously. The benefit comes from the appearance: the system behaves as if each operation occurred instantly, separated by pauses. Because of this, implementation details may be ignored by the user, except insofar as they affect performance. If an operation is not atomic, the user will also need to understand and cope with sporadic extraneous behaviour caused by interactions between concurrent operations, which by its nature is likely to be hard to reproduce and debug.

Source: Wikipedia

574 questions
-2
votes
1 answer

Is MOV instruction actually doing more than just one atomic operation at CPU level?

I'm new into assembly language and I understood that fetching data from memory can be done only through use of registers. Therefore: MOV eax, x // x is an integer MOV y, eax The machine code of a MOV operation consist of the CPU…
David
  • 39
  • 4
-2
votes
2 answers

What is the worst can happen in java race condition?

I know this is clearly a race condition. But what are the possible things that can happen? class Blah { List stuff; public List getStuff() { return stuff } public void setStuff(List newValue) { …
balki
  • 22,482
  • 26
  • 85
  • 135
-3
votes
1 answer

Atomicity - Lock Vs atomic Vs binary-semaphore - Performance

Monitor = mutex(lock) + condition variable Each Java object has a monitor, holding above principle. synchronized key word claim a monitor(lock + conditionvar) of an object. My understanding is, for atomicity, conditionvar is not required,…
overexchange
  • 11,586
  • 11
  • 75
  • 203
-8
votes
2 answers

Is Read/Write double value atomic in 64-bit x86 machine

Is it safe to assume read/write of double value is atomic in a 64-bit machine with c/c++ programming I have two process sharing a memory. process 1 is in c, which is the writer of double value and process 2 in c++ is reader of this value.
user1762571
  • 1,629
  • 4
  • 23
  • 41
1 2 3
38
39