Inter Process Communication Methods
File
A record saved on disk or a record synthesized on request from a file server, accessible by multiple processes.
Signal
A system message sent from one process to another, typically not used for data transfer but instead used for remote process control.
Socket
Data is sent over a network interface either to a different process on the same computer or to another computer on the network. Stream-oriented (TCP, data written through a socket requiring formatting to preserve message boundaries) or less commonly message-oriented (UDP, SCTP).
Unix domain socket
Similar to an internet socket, but all communication occurs within the kernel. Domain sockets use the file system as an address space. Processes refer to the domain socket as an inode and multiple processes can communicate with a single socket.
Message queue
A data stream similar to a socket, but which typically preserves message boundaries. Usually implemented by the operating system and allows multiple processes to read and write to the message queue without being directly connected to each other.
Pipe
A unidirectional data channel. Data written to the write end of the pipe is buffered by the operating system until read from the read end of the pipe. Bidirectional data streams between processes can be achieved by creating two pipes using standard input and output.
Named pipe
A pipe implemented through a file in the file system, instead of standard input and output. Multiple processes can read and write to the file as a buffer for IPC data.
Shared memory
Multiple processes are given access to the same block of memory, which creates a shared buffer so that processes can communicate with each other.
More information: Inter Process Communication
Last updated
Was this helpful?