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
Networks and operating systems have a lot of overlap. In this course, however,we are not going to discuss networking in detail, but rather focus on the networking abstractions prov

Ask quesIn JavaScript, what is event handling tion #Minimum 100 words accepted#

What is the use of multiprogramming on individual processors ? In the usual multiprocessor, which is dealing with independent or coarse-grained synchronization granularity, it i

Q. Present an algorithm for reconstructing a logical ring after a process in the ring fails? Answer: Typically distributed systems utilize a coordinator process that performs

What are scheduling queues? Since the processes enter the system they are put into job queue. This queue contains all processes in the system. The processes that are exist in m

Question : (a) The dynamic allocation problem is how to satisfy a request of size n from a list of free holes into memory. The best-fit, first-fit and worst-fit strategies are

What are the five major activities of an operating system in regard to file management? The creation and deletion of files The creation and deletion of directories The s

Question: Introduction to Operating Systems a) Define the term ‘Operating System' and identify main functions of an operating system. b) What are the characteristics of a go

Explain internal fragmentation The Internal fragmentation signifies to the result of reserving a piece of space without ever intending to use it. This space is wasted that this

You have a system with two primary workloads. One performs sequential access to a set of large files, the other performs small, independent, random reads to a separate set of large