[concurrency-interest] What can an incorrectly synchronized read see?

Bobrowski, Maciej Maciej.Bobrowski at morganstanley.com
Wed Sep 28 06:47:37 EDT 2016


´╗┐Right, so the only invalid execution in any possible sequencing is the (1, 0) which was the main question of this post, correct?

-----Original Message-----
From: Concurrency-interest [mailto:concurrency-interest-bounces at cs.oswego.edu] On Behalf Of Aleksey Shipilev
Sent: 28 September 2016 10:01
To: dholmes at ieee.org; concurrency-interest at cs.oswego.edu
Subject: Re: [concurrency-interest] What can an incorrectly synchronized read see?

On 09/28/2016 10:52 AM, David Holmes wrote:
> Is there a typo there Aleksey, the only OK outcome you listed was (0,0). ???

Note that in my note, there are two classes of executions, depending on the sequence of locks/unlocks in (R)eader and (W)riter.

(unsync, sync):
 (0, 0): justified by executions with R->W sequencing  (0, 1): justified by executions with W->R sequencing  (1, 0): is not justified by any executions  (1, 1); justified by executions with W->R sequencing

>> -----Original Message-----
>> From: Concurrency-interest [mailto:concurrency-interest- 
>> bounces at cs.oswego.edu] On Behalf Of Aleksey Shipilev Note that 
>> unsynchronized read can read either "0" or "1", regardless of if 
>> synchronized sees "1" after it.

This is for W->R sequencing.

>> Now, let's see what (V1, V2) combinations do not violate JMM:
>>  (0, 0) -- ok, both see some (default?) "0" write from before  (1, 0) 
>> -- NOT OK, r(val):V1 cannot see the w(val,1) that's after in HB!
>>  (0, 1) and
>>  (1, 1) -- NOT OK for this particular execution, because r(val):V2 
>> sees the "future" write w(val,1). Notice, however, that both these 
>> results are justified by the execution at the very beginning, when 
>> Writer and Reader are sequenced in another order.

This is for R->W sequencing.

Thanks,
-Aleksey



--------------------------------------------------------------------------------

NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers  If you cannot access these links, please notify us by reply message and we will send the contents to you. By communicating with Morgan Stanley you consent to the foregoing and to the voice recording of conversations with personnel of Morgan Stanley.


More information about the Concurrency-interest mailing list