1 / 5

IPC in BSD UNIX

IPC in BSD UNIX. Pipes a pipe is an IPC mechanism for transmitting data from one process to another within a single machine e.g., between a parent and child processes a pipe is a uni-directional IPC channel with two ends, or sockets Data that is written into one end can be read from the other.

swolfgram
Télécharger la présentation

IPC in BSD UNIX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IPC in BSD UNIX • Pipes • a pipe is an IPC mechanism for transmitting data from one process to another within a single machine • e.g., between a parent and child processes • a pipe is a uni-directional IPC channel with two ends, or sockets • Data that is written into one end can be read from the other

  2. Sockets • a socket is an IPC mechanism for transmitting data from one process to another both within a single machine and between machines • a socket is a bi-directional IPC channel • Domains for sockets - a domain is the space from which an address is drawn for a socket • UNIX domain(AF_UNIX) • uses the UNIX file system name space • used for local IPC • Internet domain(AF_INET) • uses Internet address plus a port number • used for local and remote IPC

  3. Stream Sockets • connection-oriented - communication takes place after a connection between two sockets is made • reliable, error-free, no message boundaries • Datagram Sockets • no connections • each message is addressed individually • message boundaries exist • delivery not guaranteed • error checking not provided

  4. Client-Server Communication using Sockets

  5. More on Sockets • More details on UNIX IPC can be found in Chapter 5 of the Bloomer’s book, Power Programming with RPC. • Tutorials and sample programs can be found in the /afs/p/class/cse/cs600/ipc directory

More Related