Inter-process communication
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, Inter-process communication (IPC) is a set of methods for the exchange of data among multiple threads
Thread (computer science)
In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

 in one or more processes
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...

. Processes may be running on one or more computers connected by a network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....

. IPC methods are divided into methods for message passing
Message passing
Message passing in computer science is a form of communication used in parallel computing, object-oriented programming, and interprocess communication. In this model, processes or objects can send and receive messages to other processes...

, synchronization
Synchronization (computer science)
In computer science, synchronization refers to one of two distinct but related concepts: synchronization of processes, and synchronization of data. Process synchronization refers to the idea that multiple processes are to join up or handshake at a certain point, so as to reach an agreement or...

, shared memory
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. Depending on context, programs may run on a single processor or on multiple separate processors...

, and remote procedure call
Remote procedure call
In computer science, a remote procedure call is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction...

s (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:
  • Information sharing
  • Speedup
  • Modularity
  • Convenience
  • Privilege separation
    Privilege separation
    In computer programming and computer security, privilege separation is a technique in which a program is divided into parts which are limited to the specific privileges they require in order to perform a specific task...



IPC may also be referred to as inter-thread communication and inter-application communication.

The combination of IPC with the address space
Address space
In computing, an address space defines a range of discrete addresses, each of which may correspond to a network host, peripheral device, disk sector, a memory cell or other logical or physical entity.- Overview :...

 concept is the foundation for address space independence/isolation.

Main IPC methods

Method Provided by (operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s or other environments)
File
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

 
Most operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s
Signal
Signal (computing)
A signal is a limited form of inter-process communication used in Unix, Unix-like, and other POSIX-compliant operating systems. Essentially it is an asynchronous notification sent to a process in order to notify it of an event that occurred. When a signal is sent to a process, the operating system...

 
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
Socket
Berkeley sockets
The Berkeley sockets application programming interface comprises a library for developing applications in the C programming language that perform inter-process communication, most commonly for communications across a computer network....

 
Most operating systems
Message queue
Message queue
In computer science, message queues and mailboxes are software-engineering components used for interprocess communication, or for inter-thread communication within the same process. They use a queue for messaging – the passing of control or of content...

 
Most operating systems
Pipe
Pipeline (Unix)
In Unix-like computer operating systems , a pipeline is the original software pipeline: a set of processes chained by their standard streams, so that the output of each process feeds directly as input to the next one. Each connection is implemented by an anonymous pipe...

 
All POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

 systems, Windows
Named pipe
Named pipe
In computing, a named pipe is an extension to the traditional pipe concept on Unix and Unix-like systems, and is one of the methods of inter-process communication. The concept is also found in Microsoft Windows, although the semantics differ substantially...

 
All POSIX systems, Windows
Semaphore
Semaphore (programming)
In computer science, a semaphore is a variable or abstract data type that provides a simple but useful abstraction for controlling access by multiple processes to a common resource in a parallel programming environment....

 
All POSIX systems, Windows
Shared memory
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. Depending on context, programs may run on a single processor or on multiple separate processors...

 
All POSIX systems, Windows
Message passing
Message passing
Message passing in computer science is a form of communication used in parallel computing, object-oriented programming, and interprocess communication. In this model, processes or objects can send and receive messages to other processes...


(shared nothing)
Used in MPI
Message Passing Interface
Message Passing Interface is a standardized and portable message-passing system designed by a group of researchers from academia and industry to function on a wide variety of parallel computers...

 paradigm, Java RMI, CORBA
Çorba
Chorba , ciorbă , shurpa , shorpo , or sorpa is one of various kinds of soup or stew found in national cuisines across Middle East...

, MSMQ
Microsoft Message Queuing
Microsoft Message Queuing or MSMQ is a Message Queue implementation developed by Microsoft and deployed in its Windows Server operating systems since Windows NT 4 and Windows 95. The latest Windows 7 also includes this component...

, MailSlot
MailSlot
A MailSlot is a type of interprocess communication that allows communication between processes both locally and over a network. The use of MailSlots is generally simpler than named pipes or sockets, but they are more limited.-Features:...

s, others
Memory-mapped file
Memory-mapped file
A memory-mapped file is a segment of virtual memory which has been assigned a direct byte-for-byte correlation with some portion of a file or file-like resource. This resource is typically a file that is physically present on-disk, but can also be a device, shared memory object, or other resource...

 
All POSIX systems, Windows; this method may carry race condition
Race condition
A race condition or race hazard is a flaw in an electronic system or process whereby the output or result of the process is unexpectedly and critically dependent on the sequence or timing of other events...

 risk if a temporary file
Temporary file
Temporary files may be created by computer programs for a variety of purposes; principally when a program cannot allocate enough memory for its tasks, when the program is working on data bigger than the architecture's address space, or as a primitive form of inter-process communication.- Auxiliary...

 is used

Implementations

There are several APIs which may be used for IPC. A number of platform independent APIs include the following:
  • Anonymous pipe
    Anonymous pipe
    In computer science, an anonymous pipe is a simplex FIFO communication channel that may be used for one-way interprocess communication . An implementation is often integrated into the operating system's file IO subsystem...

    s and named pipe
    Named pipe
    In computing, a named pipe is an extension to the traditional pipe concept on Unix and Unix-like systems, and is one of the methods of inter-process communication. The concept is also found in Microsoft Windows, although the semantics differ substantially...

    s
  • Common Object Request Broker Architecture
    Common Object Request Broker Architecture
    The Common Object Request Broker Architecture is a standard defined by the Object Management Group that enables software components written in multiple computer languages and running on multiple computers to work together .- Overview:CORBA enables separate pieces of software written in different...

     (CORBA)
  • Freedesktop.org
    Freedesktop.org
    freedesktop.org is a project to work on interoperability and shared base technology for free software desktop environments for the X Window System on Linux and other Unix-like operating systems. It was founded by Havoc Pennington from Red Hat in March 2000.The organisation focuses on the user....

    's D-Bus
    D-Bus
    In computing, D-Bus is a simple inter-process communication open-source system for software applications to communicate with one another. Heavily influenced by KDE2–3's DCOP system, D-Bus has replaced DCOP in the KDE 4 release. An implementation of D-Bus supports most POSIX operating...

  • Distributed Computing Environment
    Distributed Computing Environment
    The Distributed Computing Environment is a software system developed in the early 1990s by a consortium that included Apollo Computer , IBM, Digital Equipment Corporation, and others. The DCE supplies a framework and toolkit for developing client/server applications...

     (DCE)
  • Message Bus (Mbus) (specified in RFC 3259)
  • MCAPI
    MCAPI
    The Multicore Communications API is the first specification to be produced by the Multicore Association. MCAPI provides a standardized API for communication and synchronization between closely distributed embedded systems.-Overview:MCAPI is a language-independent, processor and operating system...

     Multicore Communications API
  • Lightweight Communications and Marshalling (LCM)
  • ONC RPC
  • Unix domain socket
    Unix domain socket
    A Unix domain socket or IPC socket is a data communications endpoint for exchanging data between processes executing within the same host operating system. While similar in functionality to...

    s
  • XML
    XML
    Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

     XML-RPC
    XML-RPC
    XML-RPC is a remote procedure call protocol which uses XML to encode its calls and HTTP as a transport mechanism. "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol...

     or SOAP
  • JSON
    JSON
    JSON , or JavaScript Object Notation, is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects...

     JSON-RPC
    JSON-RPC
    JSON-RPC is a remote procedure call protocol encoded in JSON. It is a very simple protocol , defining only a handful of data types and commands...

  • Thrift
    Thrift (protocol)
    Thrift is an interface definition language that is used to define and create services for numerous languages. It is used as a remote procedure call framework and was developed at Facebook for "scalable cross-language services development"...

  • TIPC
    TIPC
    Transparent Inter-process Communication is a network communications protocol for inter-process communication that was specially designed for intra-cluster communication.- Features :Some features of TIPC:...

  • ZeroC
    ZeroC
    ZeroC, Inc. is a company based in Palm Beach Gardens, Florida, U.S., revolving around the development and licensing of the Internet Communications Engine, or ICE, an object middleware system considered an alternative to CORBA and SOAP...

    's Internet Communications Engine
    Internet Communications Engine
    The Internet Communications Engine, or Ice, is an object-oriented middleware that provides object-oriented Remote Procedure Call, grid computing and Publish/subscribe functionality developed by ZeroC and dual-licensed under the GNU GPL and a proprietary license...

     (ICE)


The following are platform or programming language specific APIs:
  • Apple Computer
    Apple Computer
    Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

    's Apple events
    Apple events
    Apple events are the canonical message-based interprocess communication mechanism in Mac OS, first appearing in System 7 and supported by every version since then, including Mac OS X. Apple events describe "high-level" events such as "open document" or "print file", whereas earlier OS's had...

     (previously known as Interapplication Communications (IAC)).
  • Enea's
    ENEA AB
    ENEA is global information technology company with its headquarters in Kista, Sweden that provides real-time operating systems and consulting services...

     LINX
    LINX (IPC)
    LINX is a new generation of the OSE Link Handler that provides higher performance and more robust functionality. LINX is an Open Source program for Inter-process communications ....

     for Linux (open source) and various DSP and general purpose processors under OSE
    Operating System Embedded
    The Operating System Embedded is a real-time embedded operating system created by the Swedish information technology company ENEA AB. Bengt Eliasson, who at the time was a consultant from ENEA with an assignment at Ericsson, wrote the basic parts of the kernel...

  • IPC implementation from CMU
    Carnegie Mellon University
    Carnegie Mellon University is a private research university in Pittsburgh, Pennsylvania, United States....

    .
  • Java
    Java (programming language)
    Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

    's Remote Method Invocation
    Java remote method invocation
    The Java Remote Method Invocation Application Programming Interface , or Java RMI, is a Java application programming interface that performs the object-oriented equivalent of remote procedure calls ....

     (RMI)
  • KDE
    KDE
    KDE is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems...

    's Desktop Communications Protocol
    DCOP
    DCOP, which stands for Desktop COmmunication Protocol, is a light-weight interprocess and software componentry communication system. The main point of this system is to allow applications to interoperate, and to share complex tasks...

     (DCOP)
  • Libt2n
    Libt2n
    libt2n is a free software library which offers a simple way for C++ applications to communicate with one another.- Introduction :libt2n is an inter-process communication system which is focused on ease of use an a minimum of code-lines needed to export and use methods...

     for C++
    C++
    C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

     under Linux only, handles complex objects and exceptions
  • The Mach kernel's Mach Ports
  • Microsoft
    Microsoft
    Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

    's ActiveX
    ActiveX
    ActiveX is a framework for defining reusable software components in a programming language-independent way. Software applications can then be composed from one or more of these components in order to provide their functionality....

    , Component Object Model
    Component Object Model
    Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

     (COM), Microsoft Transaction Server
    Microsoft Transaction Server
    Microsoft Transaction Server was software that provided services to Component Object Model software components, to make it easier to create large distributed applications. The major services provided by MTS were automated transaction management, instance management and role-based security...

     (COM+), Distributed Component Object Model
    Distributed component object model
    Distributed Component Object Model is a proprietary Microsoft technology for communication among software components distributed across networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+...

     (DCOM), Dynamic Data Exchange
    Dynamic Data Exchange
    Dynamic Data Exchange is a technology for interprocess communication under Microsoft Windows or OS/2.- Overview :Dynamic Data Exchange was first introduced in 1987 with the release of Windows 2.0 as a method of interprocess communication so that one program can communicate with or control another...

     (DDE), Object Linking and Embedding
    Object Linking and Embedding
    Object Linking and Embedding is a technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control eXtension , a way to develop and use custom user interface elements...

     (OLE), anonymous pipes, named pipes, Local Procedure Call
    Local Procedure Call
    The Local Procedure Call is an internal, undocumented inter-process communication facility provided by the Microsoft Windows NT kernel for lightweight IPC between processes on the same computer...

    , MailSlots
    MailSlot
    A MailSlot is a type of interprocess communication that allows communication between processes both locally and over a network. The use of MailSlots is generally simpler than named pipes or sockets, but they are more limited.-Features:...

    , Message loop
    Message loop in Microsoft Windows
    Microsoft Windows programs are event-based. They act upon messages that the operating system posts to the main thread of the application. These messages are received from the message queue by the application by repeatedly calling the GetMessage function in a section of code called the "event...

    , MSRPC
    MSRPC
    Microsoft RPC is a modified version of DCE/RPC. Additions include support for Unicode strings, implicit handles, inheritance of interfaces , and complex calculations in the variable-length string and structure paradigms already present in DCE/RPC.- Example :The DCE 1.0 reference implementation...

    , .NET Remoting
    .NET Remoting
    .NET Remoting is a Microsoft application programming interface for interprocess communication released in 2002 with the 1.0 version of .NET Framework. It is one in a series of Microsoft technologies that began in 1990 with the first version of Object Linking and Embedding for 16-bit Windows...

    , and Windows Communication Foundation
    Windows Communication Foundation
    The Windows Communication Foundation , previously known as "Indigo", is an application programming interface in the .NET Framework for building connected, service-oriented applications.-The architectures:...

     (WCF)
  • Novell
    Novell
    Novell, Inc. is a multinational software and services company. It is a wholly owned subsidiary of The Attachmate Group. It specializes in network operating systems, such as Novell NetWare; systems management solutions, such as Novell ZENworks; and collaboration solutions, such as Novell Groupwise...

    's SPX
    IPX/SPX
    IPX/SPX stands for Internetwork Packet Exchange/Sequenced Packet Exchange. IPX and SPX are networking protocols used primarily on networks using the Novell NetWare operating systems.-Protocol Layers:...

  • PHP
    PHP
    PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document...

    's sessions
  • POSIX
    POSIX
    POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

     mmap
    Mmap
    In computing, mmap is a POSIX-compliant Unix system call that maps files or devices into memory. It is a method of memory-mapped file I/O. It naturally implements demand paging, because initially file contents are not entirely read from disk and do not use physical RAM at all...

    , message queue
    Message queue
    In computer science, message queues and mailboxes are software-engineering components used for interprocess communication, or for inter-thread communication within the same process. They use a queue for messaging – the passing of control or of content...

    s, semaphores
    Semaphore (programming)
    In computer science, a semaphore is a variable or abstract data type that provides a simple but useful abstraction for controlling access by multiple processes to a common resource in a parallel programming environment....

    , and Shared memory
    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. Depending on context, programs may run on a single processor or on multiple separate processors...

  • RISC OS
    RISC OS
    RISC OS is a computer operating system originally developed by Acorn Computers Ltd in Cambridge, England for their range of desktop computers, based on their own ARM architecture. First released in 1987, under the name Arthur, the subsequent iteration was renamed as in 1988...

    's messages
  • Solaris Doors
    Doors (computing)
    Doors are an inter-process communication facility for Unix computer systems. They provide a form of procedure call.- History :Doors were developed by Sun Microsystems as a core part of the Spring operating system, then added to Solaris in version 2.5 as an undocumented internal interface. They...

  • System V's message queues, semaphores, and shared memory
    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. Depending on context, programs may run on a single processor or on multiple separate processors...

  • Distributed Ruby
    Distributed Ruby
    Distributed Ruby or DRb allows Ruby programs to communicate with each other on the same machine or over a network. DRb uses remote method invocation to pass commands and data between processes.- External links :* * *...

  • DIPC Distributed Inter-Process Communication
  • OpenBinder
    OpenBinder
    OpenBinder is a system for Inter-process communication. It was developed at Be Inc. and then Palm, Inc. and has more recently been used in the Android operating system developed by Google....

     Open binder
  • IPC Shared Memory Messaging from Solace Systems
    Solace systems
    Solace Systems is a content networking company based in Kanata, Ontario, Canada that manufactures and sells middleware appliances. Middleware appliances are rack-mountable network devices that implement message-oriented middleware and content-based routing in purpose-built hardware...


See also

  • Computer network programming
    Computer network programming
    In computing, network programming, essentially identical to socket programming or client–server programming, involves writing computer programs that communicate with other programs across a computer network. The program or process initiating the communication is called a client process, and the...

  • Communicating Sequential Processes
    Communicating sequential processes
    In computer science, Communicating Sequential Processes is a formal language for describing patterns of interaction in concurrent systems. It is a member of the family of mathematical theories of concurrency known as process algebras, or process calculi...

     (CSP paradigm)
  • .NET Remoting
    .NET Remoting
    .NET Remoting is a Microsoft application programming interface for interprocess communication released in 2002 with the 1.0 version of .NET Framework. It is one in a series of Microsoft technologies that began in 1990 with the first version of Object Linking and Embedding for 16-bit Windows...

  • Microkernel
    Microkernel
    In computer science, a microkernel is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system . These mechanisms include low-level address space management, thread management, and inter-process communication...

  • Nanokernel
  • Protected procedure call
    Protected procedure call
    A Protected Procedure Call is a messaging facility wherein messages are sent and received using procedure call interfaces. They are a core component of the K42 operating system....


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK