[concurrency-interest] Relativity of guarantees provided byvolatile

Zhong Yu zhong.j.yu at gmail.com
Fri Aug 17 22:20:31 EDT 2012

In the model, a write completes as soon as the mail is sent, the same
thread can immediately make another write. A read completes when the
return mail is received; the reading thread is suspended during the

The example is designed so that reads are short too, so we can treat
actions as points in time, to order them easily.

On Fri, Aug 17, 2012 at 8:55 PM, David Holmes <davidcholmes at aapt.net.au> wrote:
> As I keep saying, for this to "make sense" you have to make temporal
> measurements when an action completes.
> David
>> -----Original Message-----
>> From: concurrency-interest-bounces at cs.oswego.edu
>> [mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Zhong Yu
>> Sent: Saturday, 18 August 2012 11:34 AM
>> To: Yuval Shavit
>> Cc: concurrency-interest at cs.oswego.edu; dholmes at ieee.org
>> Subject: Re: [concurrency-interest] Relativity of guarantees provided
>> byvolatile
>> Consider this physical model:
>> Each thread is a person Tx.
>> There's a person V managing all variables.
>> To make a write, Tx sends a paper mail to V. No return mail is
>> required, therefore a write is very short.
>> To make a read, Tx sends a paper mail to V, and waits for return mail.
>> The synchronization order is the order the mails received by V.
>> This seems to be a valid JMM model.
>> --
>> Now suppose thread R is very close to V, therefor reads are also very
>> short. (it's easier to talk about temporal order between short
>> actions) Suppose thread W is very far away from V.
>> To realize OP's example, consider the numbers are in hours, and route
>> W -> V takes 48 hours.
>> On Monday, W writes v=1, it reaches V on Wednesday. On Tuesday R reads
>> v=0. So the write is after read in sync order, yet write is before
>> read in temporal order(even considering relativity - all persons are
>> on Earth)
>> Therefore sync order doesn't have to be consistent with temporal order.
>> _______________________________________________
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest

More information about the Concurrency-interest mailing list