Abstract
Communicating Sequential Processes (CSP) is a paradigm for communication and synchronization among distributed processes. The alternative construct is a key feature of CSP that allows nondeterministic selection of one among several possible communicants. A generalized version of Hoare's original alternative construct that allows output commands to be included in guards has been proposed. Previous algorithms for this construct assume a message passing architecture and are not appropriate for multiprocessor systems that feature shared memory. This paper describes a distributed algorithm for the generalized alternative construct that exploits the capabilities of a parallel computer with shared memory. A correctness proof of the proposed algorithm is presented to show that the algorithm conforms to somesatefy andliveness criteria. Extensions to allow termination of processes and to ensure fairness in guard selection are also given.
Similar content being viewed by others
References
C. A. R. Hoare, Communicating Sequantial Process,Communications of the ACM 21 (8):666–677 (August) 1978).
C. A. R. Hoare,Communicating Sequantial Processes, Computer Science, Prentice Hall (1985).
E. W. Dijkstra, Guarded Commands, Nondeterminism and Formal Derivation of Programs,Communications of the ACM 18,(8):453–457 (August 1975).
A. A. Aaby and K. T. Narayana, A Distributed Implementation Scheme for Communicating Processes,Proceedings of the International Conference on Parallel Processing, pp. 942–949 (August 1986).
R. Bagrodia, A Distributed Algorithm to Implement the Generalized Alternative Command in CSP,The 6th International Conference on Distributed Computing Systems, pp. 422–427 (May 1986).
A. J. Bernstein, Output Guards and Nondeterminism inCommunicating Sequantial Processes, ACM Transactions on Programming Language and Systems 2(2):234–238 (April 1980).
G. N. Buckley and A. Silberschatz, An Efficient Implementation for the Generalized Input-Output Construct of CSP,ACM TOPLAS 5(2):223–235 (April 1983).
M. Collado, R. Morales, and J. J. Moreno, A Modula-2 Implementation of CSP,ACM SIGPLAN Notices 22(6):25–37 (June 1987).
OCCAM Programming Manuael. Inmos. Ltd. (1982).
R. B. Kieburtz and A. Silberschatz, Comments on Communicating Sequential Processes,ACM Transactions on Programming Language and Systems 1(2):218–225 (October 1979).
Z. Sun and X. Li CSM: A Distributed Programming Language,IEEE Transactions on Software Engineering SE13(4):497–500 (April 1987).
D. R. Jefferson, Virtual Time,ACM Transactions on Programming Languages and Systems 7(3):404–425 (July 1985).
J. Misra, Distributed-Discrete Event Simulation,ACM Computing Surveys 18(1):39–65 (March 1986).
D. A. Reed, A. D. Malony, and B. D. McCredie, Parallel Discrete Event Simulation: A Shared Memory Approach,Proceedings of the ACM SIGMETRICS Conference on Measuring and Modeling Computer Systems 15(1):36–38 (May 1987).
B. Thomas, et al.,Butterfly Parallel Processor Overview, BBN Report No. 6148, BBN Laboratories Incorporated (March 1986).
G. F. Pfister, et al., The IBM Research Parallel Processor Prototype (RP3): Introduction and Architecture,Proceedings of the International Conference on Parallel Processing, pp. 764–771 (August 1985).
D. D. Gajski, D. H. Lawrie, D. J. Kuck, and A. H. Sameh, Cedar,COMPCON-84, IEEE Computer Society Conference, pp. 306–309 (February 1984).
D. A. Reed and R. M. Fujimoto,Multicomputer Networks: Message-Based Parallel Processing. Computer Science, MIT Press (1987).
R. A. Karp, Proving Failure-Free Properties of Concurrent Systems. Using Temporal Logic,ACM Transactions on Programming Language and Systems 6(2):239–253 (April 1984).
N. Francez,Fairness, Springer-Verlag, New York (1986).
S. Owicki and L. Lamport, Proving Liveness Properties of Concurrent Programs,ACM Transactions on Programming Language and Systems 4(3):455–495 (July 1982).
D. Zobel, Transformations for Communication Fairness in CSP,Information Processing Letters 25:195–198 (May 1987).
Author information
Authors and Affiliations
Additional information
This work was supported by ONR Contract Number N00014-87-K-0184.
Rights and permissions
About this article
Cite this article
Fujimoto, R.M., Feng, Hc. A shared memory algorithm and proof for the generalized alternative construct in CSP. Int J Parallel Prog 16, 215–241 (1987). https://doi.org/10.1007/BF01407934
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01407934