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

  • Yosi Ben-Asher
  • Esti Stein
Session 8
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1345)


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.


Parallel Machine Mutual Exclusion Memory State Parallel Execution Original Program 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    K. R. Apt and E.-R. Olderog. Verification of Sequential and Concurrent Programs. Springer-verlag, 1991.Google Scholar
  2. 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. 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. 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. 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. 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. 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. 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. 9.
    Charles E. McDowell and David P. Helmbold. Debugging concurrent programs. ACM Computing Surveys, 21(4):593–622, Dec 1989.CrossRefGoogle Scholar
  10. 10.
    Constantine D. Polychronopoulos. Parallel programming and compilers. Kluwer academic, 1988.Google Scholar
  11. 11.
    M. Raynal. Algorithms for Mutual Exclusion. The MIT Press, 1986.Google Scholar
  12. 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. 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.CrossRefGoogle Scholar
  14. 14.
    Glynn Winskel. The Formal Semantics of Programming Languages-An Introduction. MIT press, 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Yosi Ben-Asher
    • 1
  • Esti Stein
    • 1
  1. 1.Dept. of computer scienceHaifa UniversityHaifaIsrael

Personalised recommendations