Re: JavaMemoryModel: Interaction between the memory model and exc eptions, Tread.stop()

From: Bill Pugh (pugh@cs.umd.edu)
Date: Fri Apr 09 2004 - 16:04:36 EDT


On Apr 8, 2004, at 5:36 PM, Vijay Saraswat wrote:

> Boehm, Hans wrote:
>
>> I agree that this should be discussed explicitly, and hasn't been
>> discussed sufficiently.
>>
>> My impression is that the precise exception model should be preserved
>> for synchronous exceptions,
>> and it never really existed for asynchronous ones. If everyone
>> agrees with that, we're arguably
>> done, though perhaps the JLS should really state that only
>> synchronous exceptions are precise.
>>
> What is the cost of implementing the precise exception model on modern
> multiprocessors? Is it fairly pointless to go to all this length
> specifying what should happen in the presence of race conditions when
> in fact implementing the precise exception model might be the more
> onerous burden? (because e.g. it forces the introduction of barriers
> at every JVM instruction that might potentially throw an exception.)
>

No member barriers are required at a place where an exception might be
thrown.

However, if a thread does throw an exception, all of the writes that
occurred in program order before
the place where the exception occurred must be performed, and none of
the writes that occur after\
the place where the exception is throw may be visible to other threads.

Bill

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:03 EDT