Skip to main content

Basic results in automatic transformations of shared memory parallel programs into sequential programs

  • Session 8
  • Conference paper
  • First Online:
Advances in Computing Science — ASIAN'97 (ASIAN 1997)

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

Included in the following conference series:

Abstract

We study the problem of developing a set of syntax-driven transformations for automatic translation of shared memory parallel programs into sequential programs. The result is a sequential program that is a “refinement” (its execution is consistent with one possible execution of the parallel program) of the original program. Consequently, the problem of debugging parallel programs is reduced to the problem of debugging sequential programs. Moreover, the efficiency of parallel programs can be increased by sequentializing code segments that include extra parallelism.

The main difficulty in developing such a system is to preserve the fairness property of any actual parallel execution, which states that no process can wait forever unserved. Thus, non termination of the sequential version (namely an infinite loop) is allowed only if there is at least one fair parallel execution that does not halt as well (i.e., a process that executes an infinite loop whose termination is not dependent on any other process).

We show that it is sufficient to consider the case of two sequential programs executed in parallel in order to solve the general case. We then describe several types of transformations and check their ability to preserve fairness. The results, with regards to the existence of such a transformation for general parallel programs are not conclusive; however, we do show that restricted cases (which are likely to appear in the reality) can be sequentialized using this set of transformations. The problem of detecting bad execution sequences is discussed in the last section. In particular, wrong versions of mutual exclusion algorithms are discussed. It is shown that synchronous type of transformations might overlook bad execution sequences of these algorithms. A new type of transformation, which works by nesting parallel while-loops, is developed. Indeed, it is shown that the transformed program reveals the known bug of Hyman's algorithm for mutual exclusion.

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. K. R. Apt and E.-R. Olderog. Verification of Sequential and Concurrent Programs. Springer-verlag, 1991.

    Google Scholar 

  2. Ziya Aral and Ilya Gertner. Non-intrusive and interactive profiling in Parasight. In Proc. ACM/SIGPLAN PPEALS (Parallel Programming: Experience with Applications, Languages and Systems), pages 21–30, Jul 1988.

    Google Scholar 

  3. M. J. Bach and S. J. Buroff. Multiprocessor UNIX operating systems. AT&T Bell Labs Tech. J., 63(8, part 2):1733–1749, Oct 1984.

    Google Scholar 

  4. Y. Ben-Asher and G. Haber. On the usage of simulators to detect inefficiency of parallel programs caused by bad schedulings: the simparc approach. In HiPC (High performance computing), New Delhi, India,, 1995.

    Google Scholar 

  5. Aaron J. Goldberg and John L. Hennessy. Mtool: An integrated system for performance debugging shared memory multiprocessor applications. IEEE Trans. Parallel & Distributed Syst., 4(1):28–40, Jan 1993.

    Google Scholar 

  6. Phillip Krueger and Miron Livny. A comparison of preemptive and non-preemptive load distributing.-In Intl. Conf. Distributed Comput. Syst., number 8, pages 123–130, Jun 1988.

    Google Scholar 

  7. Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, C-28(9):690–691, Sep 1979.

    Google Scholar 

  8. Allen D. Malony. Event-based performance perturbation: A case study. In Symp. Principles & Practice of Parallel Programming, number 3, pages 201–212, Apr 1991.

    Google Scholar 

  9. Charles E. McDowell and David P. Helmbold. Debugging concurrent programs. ACM Computing Surveys, 21(4):593–622, Dec 1989.

    Article  Google Scholar 

  10. Constantine D. Polychronopoulos. Parallel programming and compilers. Kluwer academic, 1988.

    Google Scholar 

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

    Google Scholar 

  12. Zary Segall and Larry Rudolph. PIE: A programming and instrumentation environment for parallel pro cessing. IEEE Software, 2(6):22–37, Nov 1985.

    Google Scholar 

  13. Jeffrey J. P. Tsai, Kwang-Ya Fang, and Horng-Yuan Chen. A noninvasive architecture to monitor real-time distributed systems. Computer, 23(3):11–23, Mar 1990.

    Article  Google Scholar 

  14. Glynn Winskel. The Formal Semantics of Programming Languages-An Introduction. MIT press, 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

R. K. Shyamasundar K. Ueda

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ben-Asher, Y., Stein, E. (1997). Basic results in automatic transformations of shared memory parallel programs into sequential programs. In: Shyamasundar, R.K., Ueda, K. (eds) Advances in Computing Science — ASIAN'97. ASIAN 1997. Lecture Notes in Computer Science, vol 1345. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63875-X_64

Download citation

  • DOI: https://doi.org/10.1007/3-540-63875-X_64

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63875-9

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics