Table of Contents
Interprocess communication, or IPC, is a voluntary exchange of information between two or more processes. Interprocess communication is sometimes referred to as interprogram communication. The latter term is avoided in this guide for two reasons.
First, a program is an artifact stored in a file that doesn't do anything. When the program is initiated, a process is created, and the process can communicate with other processes.
Second, the processes involved in interprocess communication are not necessarily instances of different programs. They might be two different instances of the same program, or they might be internal processes created by initiating procedures within the same program.
If the distinction between programs and processes seems unclear to you, read Understanding Basic Tasking Concepts before proceeding any further in this section.
Information in a computer system is always stored in a particular form. For example, to store information about whether a given condition is true or false, a process might declare a Boolean variable. To store numeric data, the process might declare an integer variable or real variable. To record a set of instructions that can be invoked repeatedly, the process might declare a procedure. All of the things that can be declared in processes can be thought of, in a general way, as “objects.”
With this point in mind, you can see that IPC consists of processes making use of objects declared by other processes. For example, if one process assigns a value of 3 to an integer variable declared in another process, this assignment is an example of interprocess communication. If a process invokes a procedure declared by another process, this procedure invocation is another example of interprocess communication.
Why should two processes need to have access to the same objects? The following are some examples:
-
In an electronic mail system.
One way for such a system to work would be for each user to initiate his or her own mail process. The mail processes could then use IPC techniques to send messages back and forth.
-
For transaction processing.
For example, you might have a file that is updated by many different online users. You can use IPC techniques to ensure that different users' updates do not overwrite each other.
-
To promote reuse of code.
You might write a procedure that is useful in many different applications. You can place the procedure in a library where it can be used by many different applications.
The system provides a variety of IPC techniques. This section introduces
-
The methods available for sharing various types of objects
-
The means of synchronizing access to the shared object

