[concurrency-interest] Relativity of guarantees provided byvolatile

Kirk Pepperdine kirk at kodewerk.com
Sat Aug 18 11:10:58 EDT 2012


On 2012-08-18, at 1:03 AM, David Holmes <davidcholmes at aapt.net.au> wrote:

> Nathan,
>  
> Is there a synchronization order here that indicates that the read occurs after the write? "subsequent" is not defined by wall-clock time as externally observed.

subsequent |ˈsəbsəkwənt|
adjective
coming after something in time;

What we have is an intractable problem that is as old as stone tablets. At the hardware level, no matter how small the time quantum is, as long as instructions take more than 1 of them and we have multiple hardware threads, there will be a gap in time where there will be a non-zero probability that  a write hasn't finished and a read will have started. That yields a non-zero probability were no one will be able to provide any guarantee as to what any value will be read. At that point all you can say is that any calculation you perform will be speculative and as is the case with any speculative calculation, you're going to have to make assumption and then before you do anything else, you're going to have to revalidate those assumptions. In this case the assumption is that you're working with a stable value as defined by the JMM. And this problem will only get worse as we add more hardware threads. The only positive is that we're gradually moving to more hardware threads which means we're able to find and correct the most probable conditions thus eliminating them before we get to the next round.

Regards,
Kirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120818/a99c25dd/attachment-0001.html>


More information about the Concurrency-interest mailing list