Skip to main content
Log in

Basic Results in Automatic Transformations of Shared Memory Parallel Programs into Sequential Programs

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

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 semantically equivalent to 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.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. K. R. Apt and E.-R. Olerog. Verification of Sequential and Concurrent Programs. Springer-Verlag, Berlin, 1991.

    Google Scholar 

  2. Z. Aral and I. Gertner. Non-intrusive and interactive profiling in Parasight. In Proceedings of ACM/SIGPLAN PPEALS (Parallel Programming: Experience with Applications, Languages and Systems), pp. 21-30, July 1988.

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

    Google Scholar 

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

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

    Google Scholar 

  6. P. Krueger and M. Livny. A comparison of preemptive and non-preemptive load distributing. In International Conference on Distributed Computer Systems, no. 8, pp. 123-130, June 1988.

    Google Scholar 

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

    Google Scholar 

  8. A. D. Malony. Event-based performance perturbation: A case study. In Symposium on Principles and Practice of Parallel Propramming, no. 3, pp. 201-212, April 1991.

    Google Scholar 

  9. C. E. McDowell and D. P. Helmbold. Debugging concurrent programs. ACM Computing Surveys, 21(4):593-622, 1989.

    Google Scholar 

  10. C. D. Polychronopoules. Parallel Programming and Compilers. Kluwer Academic, Boston, 1988.

    Google Scholar 

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

    Google Scholar 

  12. Z. Segall and L. Rudolph. PIE: A programming and instrumentation environment for parallel processing. IEEE Software, 2(6):22-37, 1985.

    Google Scholar 

  13. J. P. Tsai, K. Fang, and H. Chen. A noninvasive architecture to monitor real-time distributed systems. Computer, 23(3):11-23, 1990.

    Google Scholar 

  14. G. Winskel, The Formal Semantics of Programming Languages––An Introduction. MIT Press, Cambridge, Mass., 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ben-Asher, Y., Stein, E. Basic Results in Automatic Transformations of Shared Memory Parallel Programs into Sequential Programs. The Journal of Supercomputing 17, 143–165 (2000). https://doi.org/10.1023/A:1008178320191

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1008178320191

Navigation