Professional Documents
Culture Documents
In computing, Inter-process communication (IPC) is a set of methods for the exchange of data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods are divided into methods for message passing, synchronization, shared memory, and remote procedure calls (RPC). The method of IPC used may vary based on the bandwidth and latency of communication between the threads, and the type of data being communicated. There are several reasons for providing an environment that allows process cooperation:
IPC may also be referred to as inter-thread communication and interapplication communication. The combination of IPC with the address space concept is the foundation for address space independence/isolation
MECHANISMS:
In software engineering, a pipeline consists of a chain of processing elements (processes, threads, coroutines, etc..), arranged so that the output of each element is the input of the next. Usually some amount of buffering is provided between consecutive elements. The information that flows in these pipelines is often a stream of records, bytes or bits. The concept is also called the pipes and filters design pattern. It was named by analogy to a physical pipeline.
File
Signal
Most operating systems; some systems, such as Windows, implement signals in only the C run-time library and provide no support for their use as an IPC method[citation needed]
Socket
Message queue
Pipe
Semaphore
Shared memory
Memorymapped file
All POSIX systems, Windows; this method may carry race condition risk if a temporary file is used[citation needed]
Shared memory In computing, shared memory is memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies. Shared memory is an efficient means of passing data between programs. Depending on context, programs may run on a single processor or on multiple separate processors. Using memory for communication inside a single program, for example among its multiple threads, is generally not referred to as shared memory. Message queue Message queues provide an asynchronous communications protocol, meaning that the sender and receiver of the message do not need to interact with the message queue at the same time. Messages placed onto the queue are stored until the recipient retrieves them. Message queues have implicit or
explicit limits on the size of data that may be transmitted in a single message and the number of messages that may remain outstanding on the queue. Many implementations of message queues function internally: within an operating system or within an application. Such queues exist for the purposes of that system only.[1][2] [3] Other implementations allow the passing of messages between different computer systems, potentially connecting multiple applications and multiple operating systems.[4] These message queueing systems typically provide enhanced resilience functionality to ensure that messages do not get "lost" in the event of a system failure.