Subject: C442 JGSI Review Resent-Date: Thu, 30 Sep 1999 23:17:43 -0400 Resent-From: Geoffrey Fox Resent-To: p_gcf@npac.syr.edu Date: Fri, 17 Sep 1999 15:52:27 -0400 (EDT) From: Bryan Carpenter To: gcf@npac.syr.edu (Geoffrey Fox) CC: dbc@npac.syr.edu (Bryan Carpenter) The Java Memory Model is Fatally Flawed William Pugh a)Overall Recommendation Probably a significant paper, but I hope the author can expand on some of the points mentioned below. A summary of the organization and conclusions of the paper would be helpful (either in the introduction or conclusion). b)Words suitable for authors I suspect this paper raises important issues. Perhaps some of the points could be made in ways that would be clearer to a general audience. The abstract gives a very brief summary of the highlights of the paper. Section 1 reviews some basic properties of the Java Memory Model as it stands. Section 2 explains some apparently unintended features of the model, which make important compiler optimizations difficult. The example of section 2.1 seems simple and could probably be made clearer by adding a few more sentences (for example explaining the importance of the aliasing). Javasoft bug report #4242244 by Pugh contains a simple concrete program based on the example. It apparently detects violation of the Java specification in several major optimizing JVMs. Some words in the paper about this program would make the discussion more concrete to me. The example in Section 2.2 is more complicated. Again I think it needs more words. I suppose the constraint that is specially worrisome is that the read of `r.y' must precede the write of `p.x', even though there is no data dependence between the relevant assignments. But I can't see where the text actually states this. I wish the difficulties were stated more explicitly, and specifics of the situation could be compared with weaker models, such as coherence (mentioned earlier in the section). The author goes on to deduce that byte code reorderings are illegal. Again I would have liked more explanation. Section 3 discusses weak memory models. I wasn't sure whether the problems with weak memory models also present with the JMM, or whether the points in 3.1.1 actually arguments against weaker models? Section 4 discusses unsafe idioms with the standard Java Memory Model. I would have liked more explanation about the security issues connected with Strings being atomic and immutable (which apparently they aren't, really, with the current JMM). In section 5 I would have liked to have known who are the "group of people" discussing the safety guarantees. c)Words for me if necessary None.