Re: JavaMemoryModel: october JMM spec seems to break java's threading model

From: Sylvia Else (sylviae@optushome.com.au)
Date: Tue Nov 11 2003 - 03:27:16 EST


At 08:15 AM 7/11/2003 +1100, I wrote:

>On a notify() the notifying thread takes an entry from the wait set, locks
>the thread to be notified and then looks to see whether the thread is
>still in the wait set. If it is, then the thread can be removed from the
>wait set, prior to being unlocked.

People may be assuming that this proposal must be wrong, or otherwise
unacceptable, because no acceptable solution has been found for the
corresponding problem in Posix threads.

The Posix threads problem is not the same, because the pthread_cond_signal
function does not require that the condition variable be locked by the
calling thread. This means that the proof that notify() will terminate does
not carry across to Posix. Under Posix my proposal would indeed be fatally
flawed in that it would have a function that might never return.

Sylvia.

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



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