NEXT UP previous
 

Next: Pipes

Inter-process Communication (IPC)

In order for processes to ceoperate on some task they must be able to communicate with each other. Linux supports many different forms of inter-process communication (IPC) mechanism, each of which has advantages and disadvantages in particular circumstances. The purpose of this chapter is to review the most useful IPC mechanisms so that you can make sensible choices when you come to write co-operating concurrent processes.

The simplest way to communicate values between processes is via a file. One process writes to the file and another process reads from it. This is a surprisingly simple mechanism which has several advantages:

Despite these advantages, the use of files as a major IPC mechanism has two big drawbacks:

The simplest IPC mechanism which overcomes the problems inherent in the use of files is the pipe.


NEXT UP previous
Next: Pipes