Skip to main content

Polynomial-Time Algorithms for Enforcing Sequential Consistency in SPMD Programs with Arrays

  • Conference paper
Languages and Compilers for Parallel Computing (LCPC 2003)

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

Abstract

The simplest semantics for parallel shared memory programs is sequential consistency in which memory operations appear to take place in the order specified by the program. But many compiler optimizations and hardware features explicitly reorder memory operations or make use of overlapping memory operations which may violate this constraint. To ensure sequential consistency while allowing for these optimizations, traditional data dependence analysis is augmented with a parallel analysis called cycle detection. In this paper, we present new algorithms to enforce sequential consistency for the special case of the Single Program Multiple Data (SPMD) model of parallelism. First, we present an algorithm for the basic cycle detection problem, which lowers the running time from O(n 3) to O(n 2). Next, we present three polynomial-time methods that more accurately support programs with array accesses. These results are a step toward making sequentially consistent shared memory programming a practical model across a wide range of languages and hardware platforms.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE transactions on computers (1976)

    Google Scholar 

  2. Midkiff, S., Padua, D.: Issues in the compile-time of parallel programs. In: Proceedings of the 19th International Conference on Parallel Processing (1990)

    Google Scholar 

  3. Shasha, D., Snir, M.: Efficient and correct execution of parallel programs that share memory. ACM Transactions on Programming Languages and Systems (1988)

    Google Scholar 

  4. Krishnamurthy, A., Yelick, K.A.: Optimizing parallel programs with explicit synchronization. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 196–204 (1995)

    Google Scholar 

  5. Lee, J., Padua, P., Midkiff, S.: Basic compiler algorithms for parallel programs. In: 7th ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming (1999)

    Google Scholar 

  6. El-Ghazawi, T., Carlson, W., Draper, J.: UPC specification (2001), http://www.gwu.edu/~upc/documentation.html

  7. Hilfinger, P., et al.: Titanium language reference manual. Technical Report CSD- 01-1163, University of California, Berkeley (2001)

    Google Scholar 

  8. Numwich, R., Reid, J.: Co-Array Fortran for parallel programming. Technical Report RAL-TR-1998-060, Rutherford Appleton Laboratory (1998)

    Google Scholar 

  9. Krishnamurthy, A., Yelick, K.: Analyses and optimizations for shared address space programs. Jorunal of Parallel and Distributed Computing (1996)

    Google Scholar 

  10. Lee, J., Padua, D.: Hiding relaxed memory consistency with compilers. In: IEEE International Conference on Parallel Architectures and Compilation Techniques (PACT) (2001)

    Google Scholar 

  11. Knoop, J., Steffen, B.: Code motion for explicitly parallel programs. In: the 7th ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming (1999)

    Google Scholar 

  12. Krishnamurthy, A.: Compiler Analyses and System Support for Optimizing Sgreo hared Address Space Programs. PhD thesis, U.C. Berkeley (1998)

    Google Scholar 

  13. Chen, W., Krishnamurthy, A., Yelick, K.: Enforcing sequential consistency for SPMD programs. Technical Report CSD-03-1272, University of California, Berkeley (2003)

    Google Scholar 

  14. Kurhekar, M., Barik, R., Kumar, U.: An efficient algorithm for computing delay set in spmd programs. In: Pinkston, T.M., Prasanna, V.K. (eds.) HiPC 2003. LNCS (LNAI), vol. 2913, pp. 290–299. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  15. Midkiff, S., Padua, D., Cytron, R.: Compiling programs with user parallelism. In: Proceedings of the 2nd Workshop on Languages and Compilers for Parallel Computing (1989)

    Google Scholar 

  16. Maydan, D.E.: Accurate Analysis of Array References. PhD thesis, Stanford University (1992)

    Google Scholar 

  17. Karp, R.M., Miller, R.E., Winograd, S.: The organization of computations for uniform recurrence equations. Journal of the ACM (JACM) 14, 563–590 (1967)

    Article  MathSciNet  MATH  Google Scholar 

  18. Iwano, K., Steiglitz, K.: Testing for cycles in infinite graphs with periodic structure. In: Proceedings of the nineteenth annual ACM conference on Theory of computing, pp. 46–55. ACM Press, New York (1987)

    Google Scholar 

  19. Cohen, E., Megiddo, N.: Strongly polynomial-time and NC algorithms for detecting cycles in periodic graphs. Journal of the ACM (1993)

    Google Scholar 

  20. Abramsky, S., Hankin, C.: Abstract Interpretation of Declarative Languages, pp. 63–102. Halsted Press (1987)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chen, WY., Krishnamurthy, A., Yelick, K. (2004). Polynomial-Time Algorithms for Enforcing Sequential Consistency in SPMD Programs with Arrays. In: Rauchwerger, L. (eds) Languages and Compilers for Parallel Computing. LCPC 2003. Lecture Notes in Computer Science, vol 2958. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24644-2_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24644-2_22

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-21199-0

  • Online ISBN: 978-3-540-24644-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics