atomicity

atomicity in 32/64 bit

the question is about when does a 64bit load/store operations are considered to be atomic. if i have a 64bit processor, but i'm using 32bit OS. Will i have 64bit atomicity? if i'm using 64bit OS but running an 32bit application (using WoW64), will i have 64bit atomicity? ...

On a multicore x86, is a LOCK necessary as a prefix to XCHG?

If mem is a shared memory location, do I need: XCHG EAX,mem or: LOCK XCHG EAX,mem to do the exchange atomically? Googling this yields both yes and no answers. Does anyone know this definitively? ...

Write an atomic operation

Hi, I would like to execute some methods atomicity with Ruby, according to http://en.wikipedia.org/wiki/Atomicity_(database_systems) For instance, if I have: a = 30 b = 75 I would like to be able to do something like: atomic_operation do a += 10 b -= 39 end Is there a native module in Ruby 1.9 that allow such process? If pos...

compare and swap vs test and set

Could someone explain to me the working and differences of above operations in multi-threading? ...

Can a database support "Atomicity" but not "Consistency" or vice-versa?

I am reading about ACID properties of a database. Atomicity and Consistency seem to be very closely related. I am wondering if there are any scenarios where we need to just support Atomicity but not Consistency or vice-versa. An example would really help! ...

C# - how to make a sequence of method calls atomic?

I have to make a sequence of method calls in C# such that, if one of them fails, the subsequent methods should not be called. In short, the set of calls should be made atomic. How do I achieve this in C#? ...

C# fundamentally not portable?

I've been using C# for a while, and have recently started working on adding parallelism to a side project of mine. So, according to Microsoft, reads and writes to ints and even floats are atomic I'm sure these atomicity requirements workout just fine on x86 architectures. However, on architectures such as ARM (which may not have hardw...