Advertisement

Java: Memory consistency and process coordination

Extended abstract
  • Lisa Higham
  • Jalal Kawash
Contributed Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1499)

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.

keywords

Java Java Virtual Machine memory consistency models process coordination critical section problem producer/consumer problem non-terminating systems 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [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. [2]
    E. W. Dijkstra. Cooperating sequential processes. Technical Report EWD-123, Technological University, Eindhoven, the Netherlands, 1965. Reprinted in [4].Google Scholar
  3. [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. [4]
    F. Genuys, editor. Programming Languages. Academic Press, 1968.Google Scholar
  5. [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. [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. [7]
    J. Goodman. Cache consistency and sequential consistency. Technical Report 61, IEEE Scalable Coherent Interface Working Group, March 1989.Google Scholar
  8. [8]
    J. Gosling, B. Joy, and G. Steele. The Java Language Specifications. Addison-Wesley, 1996.Google Scholar
  9. [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. [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. [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. [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. [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. [14]
    J. Kawash. Process coordination issues in systems with weak memory consistency. Ph.D. dissertation draft, The University of Calgary.Google Scholar
  15. [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. [16]
    T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1996.Google Scholar
  17. [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. [18]
    M. Raynal. Algorithms for Mutual Exclusion. The MIT Press, 1986.Google Scholar
  19. [19]
    D. L. Weaver and T. Germond, editors. The SPARC Architecture Manual version 9. Prentice-Hall, 1994.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Lisa Higham
    • 1
  • Jalal Kawash
    • 1
  1. 1.Department of Computer ScienceThe University of CalgaryCanada

Personalised recommendations