Anda di halaman 1dari 18

| |

  
 
 
|

|   
 |
  
  
   | |
  | 
|
 |
 
|


| 
   | 
|  | 
Definition

In computing, Inter-process communication (IPC) is


a set of techniques 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.
Definition cont.
Typically, applications can use IPC categorized as
clients or servers. A ð  is an application or
a process that requests a service from some
other application or process. A  is an
application or a process that responds to a
client request. Many applications act as both a
client and a server, depending on the
situation.
Ëhat to consider when selecting a
method
Ò Should the application be able to communicate with other
applications running on other computers on a network, or
is it sufficient for the application to communicate only with
applications on the local computer?
Ò Should the application be able to communicate with
applications running on other computers that may be
running under different operating systems (such as 16-bit
Ëindows or UNIX)?
Ò Should the user of the application have to choose the other
applications with which the application communicates, or
can the application implicitly find its cooperating partners?
Ëhat to consider when selecting a
method cont.
Ò Should the application communicate with many
different applications in a general way, such as
allowing cut-and-paste operations with any other
application, or should its communications
requirements be limited to a restricted set of
interactions with specific other applications?
Ò Should the application be a GUI application or a
console application? Some IPC mechanisms
require a GUI application.
Ëindows supported The following
mechanisms(IPC techniques)
Ò Clipboard
Ò COM
Ò Data Copy
Ò DDE
Ò File Mapping
Ò Mailslots
Ò Pipes
Ò RPC
Ò Ëindows Sockets
Ò Synchronization
 !"#
Ò All applications should support the clipboard
for those data formats that they understand.
For example, a text editor or word processor
should at least be able to produce and accept
clipboard data in pure text format.
$ %&%' (&)' #&* +
supports compound documents and enables
an application to include embedded or linked
data that, when chosen, automatically starts
another application for data editing. This
enables the application to be extended by any
other application that uses Object Linking and
Embedding (OLE). COM objects provide
access to an object's data through one or
more sets of related functions, known as
interfaces.
!'! ,
Ò Data copy can be used to quickly send
information to another application using
Ëindows messaging.
Dynamic Data Exchange(DDE)
Ò DDE is not as efficient as newer technologies.
However, you can still use DDE if other IPC
mechanisms are not suitable or if you must
interface with an existing application that only
supports DDE.

&!%-
Ò File mapping is an efficient way for two or
more processes on the same computer to
share data, but you must provide
synchronization between the processes.
!. '
Ò Mailslots offer an easy way for applications to
send and receive short messages. They also
provide the ability to broadcast messages
across all computers in a network domain.
&.
Pipes provide an efficient way to redirect
standard input or output to child processes on
the same computer. Named pipes provide a
simple programming interface for transferring
data between two processes, whether they
reside on the same computer or over a
network.
&$ '&" )&#/"&)! ( )
Ò RPC is a function-level interface, with support
for automatic data conversion and for
communications with other operating
systems. Using RPC, you can create high-
performance, tightly coupled distributed
applications.
Ë%# 0. )1&'.
Ò Ëindows Sockets is a protocol-independent
interface capable of supporting current and
emerging networking capabilities.
Synchronization
Ò Process synchronization refers to multiple
processes are to join up or handshake at a
certain point, so as to reach an agreement or
commit to a certain sequence of action. Data
synchronization refers to keeping multiple
copies of a dataset in coherence with one
another, or to maintain data integrity.
Summary
Ëindows operating system provides
mechanisms for facilitating communications
and data sharing between applications.
Collectively, the activities enabled by these
mechanisms are called inter-process
communications (IPC). Some forms of IPC
facilitate the division of labour among several
specialized processes. Other forms of IPC
facilitate the division of labour among
computers on a network.

Anda mungkin juga menyukai