[concurrency-interest] On A Formal Definition of 'Data-Race'

Vitaly Davidovich vitalyd at gmail.com
Mon Apr 15 10:13:10 EDT 2013


The short of it is that a data race is a data race - it describes shared
memory access pattern.  Whether it yields correct execution is what
determines if it's benign or not, and that's circumstantial.  The classic
example is String.hashCode - it's (deliberately) data racy, but benign.
On Apr 15, 2013 9:46 AM, "Mudit Verma" <mudit.f2004912 at gmail.com> wrote:

> Another question,
>
> Is data race a race even when it is OK to loose updates/writes and read
> older stuff while working on shared memory?
>
>
> On Mon, Apr 15, 2013 at 3:41 PM, Vitaly Davidovich <vitalyd at gmail.com>wrote:
>
>> Yes this is racy; it may be benign but that depends on context.  If you
>> have reader/writer of shared memory with no explicit synch or HB, it's a
>> race by (informal) definition.
>> On Apr 13, 2013 9:51 PM, "thurstonn" <thurston at nomagicsoftware.com>
>> wrote:
>>
>>> Before I answer fully, let me ask you about another variant of the
>>> program:
>>>
>>>
>>> Thread 1                     Thread 2
>>> this.shared = 10            local = this.shared
>>>
>>> Is this "racy"?  Clearly there is no explicit happens-before.  But, at
>>> least
>>> in my reading of the (your) definition that I quoted in my OP, it
>>> wouldn't
>>> qualify as a data-race.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://jsr166-concurrency.10961.n7.nabble.com/On-A-Formal-Definition-of-Data-Race-tp9408p9413.html
>>> Sent from the JSR166 Concurrency mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Concurrency-interest mailing list
>>> Concurrency-interest at cs.oswego.edu
>>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>>
>>
>> _______________________________________________
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20130415/b7b6461a/attachment-0001.html>


More information about the Concurrency-interest mailing list