Synchronous Message Passing SMP
Prabhaker Mateti
This web page is organized in way that is useful during my lecture,
instead of ppt slides.
Synchronous Message Passing SMP
- send message e to process B
-- e an expression
- receive message x from process A
-- var x local to B
- receiver waits for a message
- send operation blocks until received
-- implies no/zero buffering
-- implied synchronization
-- cannot send messages to self
-- communication + sync
- sender and receiver execute independently
- "time gap" between send and the corresponding receive is "zero"
- "time taken" by send and the corresponding receive is ...
PL constructs for SMP
- Q ! e to process Q send the value of expression e
- P ? v
receive message sent by P and deposit it in variable v
- based on CSP
References
- Gregory R. Andrews, Concurrent Programming: Principles and
Practice, Benjamin/Cummings, 1991. Chapter 8 on SMP and also
Section 10.2 on Occam. Required Reading.
- C. A. R. Hoare, ``Communicating Sequential
Processes,'' Communications of the ACM, 1978, Vol. 21,
No. 8, 666-677. This paper has many exercises for you to do.