Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction to Concurrency
- 2 Processes and the Specification of Concurrency
- 3 Communication between Processes
- 4 High-Level Concurrency Constructs - Shared Data
- 5 High-Level Concurrency Constructs - Message Passing
- 6 Languages for Concurrency
- 7 Implementation of a Concurrency Kernel
- Bibliography
- Index
3 - Communication between Processes
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- 1 Introduction to Concurrency
- 2 Processes and the Specification of Concurrency
- 3 Communication between Processes
- 4 High-Level Concurrency Constructs - Shared Data
- 5 High-Level Concurrency Constructs - Message Passing
- 6 Languages for Concurrency
- 7 Implementation of a Concurrency Kernel
- Bibliography
- Index
Summary
As long as all of the concurrent processes are proceeding completely independently of each other, we would expect them all to continue at their own speed until they terminate (if they do). If this does not happen, that is if the results of a process are affected by the presence or absence of another supposedly independent process, then we have to investigate the underlying mechanism to find the reason for this problem. For the purposes of the discussion of the concurrent processes themselves, they will have an effect on one another only if they are required to communicate with each other.
We have already seen one example of inter-process communication as manifested in one of the process creation and deletion methods. This entailed the parent process calling the fork operation to initiate the child process, and the subsequent join operation (if there is one) as a way of resynchronising the parent and child. These two operations are very restrictive, allowing as they do the parent and child to synchronise with each other only when the child begins and ends its execution. What is required is a more general mechanism (or mechanisms) by which two processes may communicate with each other, not just at the beginning and end of the lives of the processes. A discussion of several possible methods is the subject of this chapter.
- Type
- Chapter
- Information
- Concurrent Programming , pp. 42 - 77Publisher: Cambridge University PressPrint publication year: 1992