Automatic Implementation of Programming Language Consistency Models

  • Zehra Sura
  • Chi-Leung Wong
  • Xing Fang
  • Jaejin Lee
  • Samuel P. Midkiff
  • David Padua
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2481)

Abstract

Concurrent threads executing on a shared memory system can access the same memory locations. A consistency model defines constraints on the order of these shared memory accesses. For good run-time performance, these constraints must be as few as possible. Programmers who write explicitly parallel programs must take into account the consistency model when reasoning about the behavior of their programs. Also, the consistency model constrains compiler transformations that reorder code. It is not known what consistency models best suit the needs of the programmer, the compiler, and the hardware simultaneously. We are building a compiler infrastructure to study the effect of consistency models on code optimization and run-time performance. The consistency model presented to the user will be a programmable feature independent of the hardware consistency model. The compiler will be used to mask the hardware consistency model from the user by mapping the software consistency model onto the hardware consistency model. When completed, our compiler will be used to prototype consistency models and to measure the relative performance of different consistency models. We present preliminary experimental data for performance of a software implementation of sequential consistency using manual inter-thread analysis.

References

  1. 1.
    Adve, S.V., Gharachorloo, K.: Shared memory consistency models: A tutorial. IEEE Computer, 66–76 (December 1996)Google Scholar
  2. 2.
    Alpern, B., et al.: The Jalapeno virtual machine. IBM Systems Journal (February 2000)Google Scholar
  3. 3.
    Choi, J.-D., Gupta, M., Serrano, M., Sreedhar, V.C., Midkiff, S.: Escape analysis for Java. In: Proceedings ACM 1999 Conference on Object-Oriented Programming Systems (OOPSLA 1999), November 1999, pp. 1–19 (1999)Google Scholar
  4. 4.
    Emrath, P.A., Ghosh, S., Padua, D.A.: Event synchronization analysis for debugging parallel programs. In: Proceedings of Supercomputing, pp. 580–588 (1989)Google Scholar
  5. 5.
    Fang, X.: Inserting fences to guarantee sequential consistency. Master’s thesis, Michigan State University (July 2002)Google Scholar
  6. 6.
    Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 2nd edn. The Java Series. Addison-Wesley Publishing Company, Redwood City (2000)Google Scholar
  7. 7.
    Hill, M.D.: Multiprocessors should support simple memory-consistency models. IEEE Computer, 28–34 (August 1998)Google Scholar
  8. 8.
    Krishnamurthy, A., Yelick, K.: Optimizing parallel SPMD programs. In: Seventh Workshop on Languages and Compilers for Parallel Computing (August 1994)Google Scholar
  9. 9.
    Krishnamurthy, A., Yelick, K.: Analyses and optimizations for shared address space programs. Journal of Parallel and Distributed Computing 38, 139–144 (1996)CrossRefGoogle Scholar
  10. 10.
    Lee, J., Midkiff, S.P., Padua, D.A.: Concurrent static single assignment form and constant propagation for explicitly parallel programs. In: Proceedings of The 10th International Workshop on Languages and Compilers for Parallel Computing, pp. 114–130. Springer, Heidelberg (1997)Google Scholar
  11. 11.
    Lee, J., Padua, D.A.: Hiding relaxed memory consistency with compilers. In: Proceedings of The 2000 International Conference on Parallel Architectures and Compilation Techniques (October 2000)Google Scholar
  12. 12.
    Lee, J., Padua, D.A., Midkiff, S.P.: Basic compiler algorithms for parallel programs. In: Proceedings of The 1999 ACM SIGPLAN Symposiun on Principles and Practice of Parallel Programming, May 1999, pp. 1–12 (1999)Google Scholar
  13. 13.
    Naumovich, G., Avruninand, G.S., Clarke, L.A.: An efficient algorithm for computing MHP information for concurrent Java programs. In: Proceedings of Seventh European Software Engineering Conference and Seventh ACM SIGSOFT Symposium on the Foundations of Software Engineering (September 1999)Google Scholar
  14. 14.
    Pugh, W.: Fixing the Java memory model. In: Proceedings of the ACM 1999 Java Grande Conference (June 1999)Google Scholar
  15. 15.
    Rugina, R., Rinard, M.: Pointer analysis for multithreaded programs. In: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, June 1999, pp. 77–90 (1999)Google Scholar
  16. 16.
    Shasha, D., Snir, M.: Efficient and correct execution of parallel programs that share memory. ACM Transactions on Programming Languages and Systems 10(2), 282–312 (1988)CrossRefGoogle Scholar
  17. 17.
    Wong, C.-L., Sura, Z., Fang, X., Midkiff, S.P., Lee, J., Padua, D.: The Pensieve Project: A Compiler Infrastructure for Memory Models. In: The International Symposium on Parallel Architectures, Algorithms, and Networks (May 2002)Google Scholar
  18. 18.
    Eclipse Platform Technical Overview. Object Technology International, Inc. (July 2001), Available at http://www.eclipse.org
  19. 19.
    The NetBeans Platform. Sun Microsystems, Inc., Documentation, available at http://www.netbeans.org

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Zehra Sura
    • 1
  • Chi-Leung Wong
    • 1
  • Xing Fang
    • 2
  • Jaejin Lee
    • 3
  • Samuel P. Midkiff
    • 2
  • David Padua
    • 1
  1. 1.University of Illinois at Urbana-ChampaignUrbanaUSA
  2. 2.Purdue UniversityWest LafayetteUSA
  3. 3.Seoul National UniversitySeoulKorea

Personalised recommendations