Communicating Sequential Processes

The Communicating Sequential Processes (CSP) domain in Ptolemy II models a system as a network of processes communicating with messages through unidirectional channels. If a process is ready to send a message, it blocks until the receiving process is ready to accept it. Similarly if a process is ready to accept a message, it blocks until the sending process is ready to send it. Thus the communication between processes is rendezvous based as both the reading and writing processes block until the other side is ready to communicate. This model of computation is non-deterministic as a process can be blocked waiting to send or receive on any number of channels. It is also highly concurrent due to the nature of the model.

The model of computation used in the CSP domain is based on the CSP model first proposed by Hoare[2] in 1978. In this model, a system is modeled as a network of processes communicating via messages along unidirectional channels. This is the only way processes can communicate as there is no shared state. The transfer of message between processes is via rendezvous, which means both the sending and receiving of a messages from a channel are blocking: i.e. the sending or receiving process stalls until the message is transferred. Some of the notation used here is borrowed from Andrews' book on concurrent programming [1], which refers to rendezvous-based message passing as synchronous message passing.

Applications for the CSP domain include resource management and high level system modeling early in the design cycle. Resource management is often required when modeling embedded systems, and to further support this, a notion of time has been added to the model of computation used in the domain. This differentiates our CSP model from those more commonly encountered, which do not typically have any notion of time, although several versions of timed CSP have been proposed[3]. It might thus be more accurate to refer to the domain using our model of computation as the "Timed CSP" domain, but since the domain can be used with and without time, it is simply referred to as the CSP domain.

References

  1. Neil Smyth "Communicating Sequential ProcessesDomain in Ptolemy II," MS Report, UCB/ERL Memorandum M98/70, Dept. of EECS, University of California, Berkeley, CA 94720, December 1998.
  2. Andrews, G. R., Concurrent Programming - Principles and Practice, Addison-Wesley, 19991.
  3. Hoare, C. A. R., "Communicating Sequential Processes," Communications of the ACM, vol. 21, no. 8, August 1978.
  4. Hinchey, M. G. and Jarvis, S. A., Concurrent Systems: Formal Developments in CSP, Mcgraw-Hill, 1995.