Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interprocess Communication

Similar presentations


Presentation on theme: "Interprocess Communication"— Presentation transcript:

1 Interprocess Communication
Andrej Kuznecov, PS3 group 2

2 Table of Contents What is a process?
What is Interprocess Communication? How does it work? Interprocess Communication mechanisms in Windows

3 Process Process is an executing program.

4 What is Interprocess Communication?
Mechanisms an operating system provides to allow the processes to manage shared data.

5 How does IPC work? Applications are categorized as clients and servers, where the client requests data and the server responds to client requests. Majority of applications are both a client and a server.

6 IPC mechanisms in Windows
Clipboard, Data Copy, Dynamic Data Exchange (DDE), File Mapping, Mailslots, Pipes, Remote Procedure Call (RPC), Sockets.

7 Clipboard Central depository for data sharing among applications (cut, copy). Applications agree on data format. Applications can be anywhere on a network. Example: copying text from Notepad to Google Search Bar.

8 Clipboard API functions:
OpenClipboard(), EmptyClipboard(), SetClipboardData(), GetClipboardData(), CloseClipboard().

9 Data Copy Enables an application to send information to another application using the VM_COPYDATA message. Requires cooperation between the sending application and the receiving application. Works only on same computer. API function: SendMessage().

10 Dynamic Data Exchange (DDE)
DDE is a message-based protocol. Uses shared memory to exchange data. Applications can be anywhere on a network. DDE is not as efficient as newer technologies.

11 File Mapping Enables a process to treat the contents of a file as if they were a block of memory in the process' address space. Efficient way for two or more processes on the same computer to share data Processes must be synchronized.

12 File Mapping API functions:
CreateFileMapping(), MapViewOfFile(), UnMapViewOfFile(), CloseHandle().

13 Mailslots Only Windows feature. Provides one-way communication.
Mailslot clients send data to mailslot server. Offer an easy way for applications to send and receive short messages across all computers in a network.

14 Mailslots API functions:
Server: Creat slot(), ReadMailslot(), GetMailslotInfo(), CloseHandle(). Client: CreateFile(), Writ slot(),

15 Pipes Two types of pipes: named and anonymus.
Named pipes transfer data between unrelated processes. Anonymus pipe works between processes on same computer. Provide a simple programming interface for transferring data between two processes.

16 Pipes API functions: CreateNamedPipe(), ConnectNamedPipe(),
WaitNamedPipe(), DisconnectNamedPipe(), ReadFile(), WriteFile(), CloseHandle().

17 Remote Procedure Call (RPC)
Enables applications to call functions remotely. RPC is a function-level interface, used for: Automatic data conversion. Communications with other operating systems. Using RPC, it is possible to create high-performance, tightly coupled distributed applications.

18 Sockets Applications can send or receive packets of data across a network. Two types of sockets are available: Stream Sockets – stream of bytes. No record boundaries. Datagram Sockets – record-oriented data flow that is not guaranteed to be delivered. Used in: Client/Server models. Peer-to-peer scenarios (chat applications) Making remote procedure calls (RPC)

19 Thank you


Download ppt "Interprocess Communication"

Similar presentations


Ads by Google