Interprocess communication, Operating System

Now we consider the following questions: how can the parent process communicate with its child? Or how can children processes communicate with other children? The exact answer depends on the exact problem being treated, but in general we call the several different approaches to this question by the name of Interprocess Communication (IPC).

On possibility for IPC is to use sockets. This approach is based on explicit message passing, and has the advantage that processes can be distributed anywhere on the Internet, among several different machines. An application designed to use sockets can fairly easily be re-deployed as a multi-server application when its needs outgrow a single server.

Another possibility is the use of mmap, which is a hack, although a very common one. Mmap uses memory sharing as an indirect way of communicating. The way that this works is that all processes map the same ?le into a ?xed memory location. In this case, however, since we have objects being read fromandwritten to a sharedmemory region,wemust use some kind of process-level synchronization. Unfortunately, these synchronization procedures are in general much more expensive than the use of threads itself.

One can also use signals; in this case, processes can send and receive integer numbers associated with particular signal numbers. In order to be able to receive and treat these numbers, processes must ?rst set up signal handlers. This approach works best for rare events1. In general, signals are not very useful for parallel or concurrent programming.

The other possibility is the use of pipes. These are unidirectional communication channels which make it possible for the output of one program to be used as input to another one, just like in Unix (for example, when we use the pipe symbol, as in "ls j wc -l". The advantage of using pipes is that they are easy and fast.

Posted Date: 3/12/2013 4:13:46 AM | Location : United States







Related Discussions:- Interprocess communication, Assignment Help, Ask Question on Interprocess communication, Get Answer, Expert's Help, Interprocess communication Discussions

Write discussion on Interprocess communication
Your posts are moderated
Related Questions
when demand is 24000 units/year, production rate is 48000 units/year, setup cost is rs 200 per setup, carring cost is rs 20 per units/year, and economic batch quantity is 692.8203

Explain the difference between internal and external fragmentation. Internal Fragmentation is the area in a region or a page that is not used by the job occupying that region o

EXAMPLE FOR SEGMENTATION Consider an instance as given in the table and we have five segments numbered from 0 through 4 the segment is stock in the physical memory as shown. Th

what is process creation and how to create a process

MEMORY MANAGEMENT USING BIT MAPS   In this memory is separated into different allocation units each of some particular size(a few bites).consider every space of size 4k. A

Define drawback of Distributed systems Reliability is a drawback of Distributed systems

What is a resource-allocation graph? Deadlocks can be explained more precisely in terms of a directed graph called a system resource allocation graph. This graph having of a se

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

Q. What are the major differences between capability lists and access lists? Answer: An access list is a list for each object consisting of the domains with a nonempty set of

What is a client server system? Centralized systems proceed as server systems to satisfy request generated by client systems Server system is able to be broadly div