Pipes

A pipe is a simple type of channel of communication between two processes.

UNIX/Linux and Windows systems implement pipes, usually as files.

To start communicating, both processes call functions that create the pipe(s). Then, a process sends data through a pipe by issuing a system call similar to write(), while the other process accesses this data by calling read(). Since the data exchange is moderated by the OS (via the system calls,) a pipe is also a Message Passing mechanism.

Pipes can be implemented as one-directional or bidirectional. A bidirectional pipe allows data to be sent back and forth. In addition, some pipes can be used only by processes on the same computer, while other pipe types can be used by those running on two different devices attached to a network.

Two general types of pipes are commonplace: Ordinary Pipes and FIFOs.