Abstract
In Java, some memory updates are necessarily visible to some threads but never to others. A definition of Java memory consistency must take this fact into consideration to capture the semantics of non-terminating systems, such as a Java operating system. This paper presents a programmer-centered formal definition of Java memory behavior that captures those semantics.
Our definition is employed to prove that it is impossible to provide fundamental process coordination in Java, such as critical sections and producer/consumer coordination, without the use of the synchronized and volatile constructs. However, we introduce a form of synchronization that is weaker than volatiles and would suffice to solve some of these problems in Java.
This work was supported in part by research grant OGP0041900 and a post-graduate scholarship both from the Natural Sciences and Engineering Research Council of Canada.
Preview
Unable to display preview. Download preview PDF.
References
M. Ahamad, R. Bazzi, R. John, P. Kohli, and G. Neiger. The power of processor consistency. In Proc. 5th ACM Symp. on Parallel Algorithms and Architectures, pages 251–260, June 1993. Also available as College of Computing, Georgia Institute of Technology technical report GIT-CC-92/34.
E. W. Dijkstra. Cooperating sequential processes. Technical Report EWD-123, Technological University, Eindhoven, the Netherlands, 1965. Reprinted in [4].
M. Dubois, C. Scheurich, and F. Briggs. Memory access buffering in multiprocessors. Proc. of the 13th Annual Int'l Symp. on Computer Architecture, pages 434–442, June 1986.
F. Genuys, editor. Programming Languages. Academic Press, 1968.
A. Gontmakher and A. Schuster. Java consistency: Non-operational characterizations of Java memory behavior. Technical Report CS0922, Computer Science Department, Technion, November 1997.
A. Gontmakher and A. Schuster. Characterizations of Java memory behavior. In Proc. of the 12th Int'l Parallel Processing Symp., April 1998.
J. Goodman. Cache consistency and sequential consistency. Technical Report 61, IEEE Scalable Coherent Interface Working Group, March 1989.
J. Gosling, B. Joy, and G. Steele. The Java Language Specifications. Addison-Wesley, 1996.
L. Higham and J. Kawash. Critical sections and producer/consumer queues in weak memory systems. In Proc. of the 1997 Int'l Symp. on Parallel Architectures, Algorithms, and Networks, pages 56–63, December 1997.
L. Higham and J. Kawash. Java: Memory consistency and process coordination. Technical Report 98/622/13, Department of Computer Science, The University of Calgary, April 1998.
L. Higham, J. Kawash, and N. Verwaal. Defining and comparing memory consistency models. In Proc. of the 10th Int'l Conf. on Parallel and Distributed Computing Systems, pages 349–356, October 1997.
L. Higham, J. Kawash, and N. Verwaal. Weak memory consistency models part I: Definitions and comparisons. Technical Report 98/612/03, Department of Computer Science, The University of Calgary, January 1998. Submitted for publication.
L. Higham, J. Kawash, and N. Verwaal. Weak memory consistency models part II: Process coordination problems. Technical Report 98/613/04, Department of Computer Science, The University of Calgary, January 1998. Submitted for publication.
J. Kawash. Process coordination issues in systems with weak memory consistency. Ph.D. dissertation draft, The University of Calgary.
L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. on Computers, C-28(9):690–691, September 1979.
T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1996.
R. J. Lipton and J. S. Sandberg. PRAM: A scalable shared memory. Technical Report 180–88, Department of Computer Science, Princeton University, September 1988.
M. Raynal. Algorithms for Mutual Exclusion. The MIT Press, 1986.
D. L. Weaver and T. Germond, editors. The SPARC Architecture Manual version 9. Prentice-Hall, 1994.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Higham, L., Kawash, J. (1998). Java: Memory consistency and process coordination. In: Kutten, S. (eds) Distributed Computing. DISC 1998. Lecture Notes in Computer Science, vol 1499. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0056484
Download citation
DOI: https://doi.org/10.1007/BFb0056484
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65066-9
Online ISBN: 978-3-540-49693-9
eBook Packages: Springer Book Archive