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

From: Vijay Saraswat (vijay@saraswat.org)
Date: Thu Apr 08 2004 - 17:36:49 EDT


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.)

I have no idea, I am asking for illumination ...hopefully someone on
this list has thought this through...

The Memory Model semantics will have to say something about it. For
instance, take any of our 20-odd Tests. Somewhere in the loop in which a
read sees an out-of-order write put in an instruction that potentially
throws an exception. Does this force a barrier of some sort so that in
fact that read cant see the write?

I haven't thought this through, it just worries me that at this late
stage of the game there are no test cases that cover this potentially
tricky area of interaction. If someone can lay these worries to rest,
great, otherwise there is more work to be done.

Best,
Vijay

PS: Just got hold of http://citeseer.ist.psu.edu/gupta00optimizing.html
-- will look at it overnight.

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



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