In computer science, inter-process communication (IPC) is the activity of sharing data across multiple and commonly specialized processes using communication protocols. Typically, applications using IPC are categorized as clients and servers, where the client requests data and the server responds to client requests.Many applications are both clients and servers, as commonly seen in distributed computing. Methods for achieving IPC are divided into categories which vary based on software requirements, such as performance and modularity requirements, and system circumstances, such as network bandwidth and latency.
There are several reasons for implementing inter-process communication systems:
There are several reasons for implementing inter-process communication systems:
Example : web servers
- Sharing information; for example, web servers use IPC to share web documents and media with users through a web browser.
- Distributing labor across systems; for example, this blog uses multiple servers that communicate with one another using IPC to process user requests.
- Privilege separation; for example, HMI software systems are separated into layers based on privileges to minimize the risk of attacks. These layers communicate with one another using encrypted IPC.
Different ways of process inter-communication :
File A record stored on disk, or a record synthesized on demand by a file server, which can be accessed by multiple processes.
Signal A system message sent from one process to another, not usually used to transfer data but instead used to remotely command the partnered process.
Socket A data stream sent over a network interface, either to a different process on the same computer or to another computer on the network.
Message queue An anonymous data stream similar to a socket, usually implemented by the operating system, that allows multiple processes to read and write to the message queue without being directly connected to each other.
Pipe A two-way data stream between two processes interfaced through standard input and output and read in one character at a time.
Named pipe A pipe implemented through a file on the file system instead of standard input and output. Multiple processes can read and write to the file as a buffer for IPC data.
Semaphore A simple structure that synchronizes multiple processes acting on shared resources.
File A record stored on disk, or a record synthesized on demand by a file server, which can be accessed by multiple processes.
Signal A system message sent from one process to another, not usually used to transfer data but instead used to remotely command the partnered process.
Socket A data stream sent over a network interface, either to a different process on the same computer or to another computer on the network.
Message queue An anonymous data stream similar to a socket, usually implemented by the operating system, that allows multiple processes to read and write to the message queue without being directly connected to each other.
Pipe A two-way data stream between two processes interfaced through standard input and output and read in one character at a time.
Named pipe A pipe implemented through a file on the file system instead of standard input and output. Multiple processes can read and write to the file as a buffer for IPC data.
Semaphore A simple structure that synchronizes multiple processes acting on shared resources.
Shared memory Multiple processes are given access to the same block of memory which creates a shared buffer for the processes to communicate with each other.
Message passing Allows multiple programs to communicate using channels, commonly used in concurrency models.
Memory-mapped file A file mapped to RAM and can be modified by changing memory addresses directly instead of outputting to a stream. This shares the same benefits as a standard file.
No comments:
Post a Comment