The Java Memory Model

This web page is a starting point for discussions of and information concerning the Java Memory Model (Chapter 17 of the Java Language Specification). The Java Memory Model defines how threads interact through memory. It used to be somewhat unclear and unnecessarily limiting, and so was revised. This is a reference page for that revision. The official site for JSR 133 - The Java(tm) Memory Model and Thread Specification Revision - is here.

This page is divded up into several sections:

Reference Material

These reference materials are a good starting point for anyone trying to understand the memory model. Between them, they cover most of the major issues involved.

Mailing list

Additional Information

Double-Checked Locking is Broken

Double-checked locking (also known as the multithreaded singleton pattern) is a widely employed idiom for publishing a singleton object to multiple threads.

Other information

Older Material (for the memory model historians among you)

This is a list of many of the revisions that the memory model underwent over the course of its three years in flight. They are mostly out of date. If you are interested in the model as it stands, your best bet is the reference material

Draft Proposals for the Memory Model


Additional Background Reading

By Doug Lea

By Cenciarelli et al

By Schuster et al.

On other memory models

By Arvind et al.

By others

This page maintained by William Pugh. This material is based upon work supported by the National Science Foundation under Grant No. 0098162. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.