RE: JavaMemoryModel: Mutual exclusion effect of locks

From: Yue Yang (
Date: Tue Jul 29 2003 - 15:40:15 EDT


This should be part of JMM because it directly affects legal memory
ordering. Users shouldn't have to look elsewhere to find out this
fundamental requirement.

Note that the original JMM explicitely specifies this (section 17.5) even
though it might have been mentioned in other places.


On Tue, 29 Jul 2003, David Holmes wrote:

> Yue Yang wrote:
> >
> > The monitor enter and the corresponding monitor exit
> > operation impose a critical section effect for the code between
> them. That
> > is, they should be properly nested. Although this is an apparent
> > requirement, the JMM would not be complete without stating it.
> The mutual exclusion effects of monitors are not part of the memory
> model. They are specified by the language and JVM specifications. All
> the JMM needs to do is define the effects of monitor entry and exit in
> terms of the memory model.
> Of course one has to remember this when considering possible
> interleavings.
> David Holmes

JavaMemoryModel mailing list -

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