Skip to main content

Java: Memory consistency and process coordination

Extended abstract

  • Contributed Papers
  • Conference paper
  • First Online:
Distributed Computing (DISC 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1499))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. E. W. Dijkstra. Cooperating sequential processes. Technical Report EWD-123, Technological University, Eindhoven, the Netherlands, 1965. Reprinted in [4].

    Google Scholar 

  3. 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.

    Google Scholar 

  4. F. Genuys, editor. Programming Languages. Academic Press, 1968.

    Google Scholar 

  5. A. Gontmakher and A. Schuster. Java consistency: Non-operational characterizations of Java memory behavior. Technical Report CS0922, Computer Science Department, Technion, November 1997.

    Google Scholar 

  6. A. Gontmakher and A. Schuster. Characterizations of Java memory behavior. In Proc. of the 12th Int'l Parallel Processing Symp., April 1998.

    Google Scholar 

  7. J. Goodman. Cache consistency and sequential consistency. Technical Report 61, IEEE Scalable Coherent Interface Working Group, March 1989.

    Google Scholar 

  8. J. Gosling, B. Joy, and G. Steele. The Java Language Specifications. Addison-Wesley, 1996.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. 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.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. J. Kawash. Process coordination issues in systems with weak memory consistency. Ph.D. dissertation draft, The University of Calgary.

    Google Scholar 

  15. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. on Computers, C-28(9):690–691, September 1979.

    Google Scholar 

  16. T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1996.

    Google Scholar 

  17. R. J. Lipton and J. S. Sandberg. PRAM: A scalable shared memory. Technical Report 180–88, Department of Computer Science, Princeton University, September 1988.

    Google Scholar 

  18. M. Raynal. Algorithms for Mutual Exclusion. The MIT Press, 1986.

    Google Scholar 

  19. D. L. Weaver and T. Germond, editors. The SPARC Architecture Manual version 9. Prentice-Hall, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Shay Kutten

Rights and permissions

Reprints 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

Publish with us

Policies and ethics