Chapter 14 IPC without shared memory
Objectives
To study the ways in which IPC between processes which do not share memory is supported. The study is relevant to both single-computer and distributed systems - refer to the special characteristics of distributed systems covered in Chapter 5.
Points to emphasise
- Files are mentioned only as a "first attempt". They are not suitable for a general IPC mechanism. Pipes may be thought of as files that are kept in main memory for reasons of efficiency and for which read and write accesses have been augmented with a synchronisation mechanism.
- Message passing is the most general and flexible IPC mechanism for processes which do not share memory.
- Recall (Section 8.6) the process interactions that may be needed.
- The concepts of naming and binding are relevant to, and often motivate, the variations of message passing.
- Synchronous message passing avoids the overhead of buffer management in the implementation. It is likely to push buffer handling into the application because heavily used servers cannot be expected to synchronise with clients to send replies to requests for work.
- Note the overhead of message passing. Memory management can be used to reduce the overhead of copying.
- Message passing is used in existing systems and languages.
- Recall the duality discussed in Chapter 12.
Possible difficulties
There are a large number of variations on basic message passing. Some of this material could be left for private study once the basic approach is covered. It is important to have a thread of development.
Teaching hints
- The approach taken is to consider the process interactions that might be required and to show the variations on message passing that are designed to meet these requirements. The students could be asked to go back to Section 8.6 and to discuss how the interactions set up there are met.
- Naming and binding can be used as a focus. Do the processes involved in the interactions know each others’ names? How are sender(s) and receiver(s) named (directly or via an indirection)? How and when does the binding between sender(s) and receiver(s) take place?
- Practical work would be useful to reinforce this chapter.