2.3.5. Rehearsal

At this point, you should know how processes can exchange information. You should be able to distinguish the various ways of exchanging information based on their applicability, efficiency and utility.

You should be able to characterize basic properties of message passing mechanisms and to relate these properties to both the architecture of the operating system and the requirements of the applications.

Based on your knowledge of how processes communicate using message passing, you should be able to design an intelligent message passing API.

You should be able to explain how remote procedure calls mimic local procedure calls and how certain issues limit ideal substitutability of the two mechanisms. You should be able to explain why the code of stubs can be generated and what information is necessary for that.

Questions. 

  1. Propose an interface through which a process can set up a shared memory block with another process.

  2. Define synchronous and asynchronous message passing.

  3. Define blocking and non blocking message sending and reception.

  4. Explain how polling can be used to achieve non blocking message reception.

  5. Explain how callbacks can be used to achieve non blocking message reception.

  6. Explain when a synchronous message sending blocks the sender.

  7. Explain when an asynchronous message sending blocks the sender.

  8. Propose a blocking interface through which a process can send a message to another process. Use synchronous message passing with direct addressing.

  9. Propose a blocking interface through which a process can send a message to another process. Use asynchronous message passing with indirect addressing.

Exercises. 

  1. Design a process communication mechanism based on message passing suitable for a microkernel operating system. Describe the interface used by a process to communicate with other processes. Include specialized support for very short messages that would be communicated as quickly as possible, and specialized support for very long messages that would be communicated as efficiently as possible. Compare the overhead introduced by the process communication mechanism with the overhead of a local procedure call.