Interprocess communication, Operating System

Assignment Help:

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.


Related Discussions:- Interprocess communication

Define the executor (worker thread), Define the Executor (Worker Thread)  ...

Define the Executor (Worker Thread)  The responsibility of the Executor (or Worker Threads) is to execute instructions on behalf of a client-server connection. The Executor mus

What are turnaround time and response time, What are turnaround time and re...

What are turnaround time and response time? Turnaround time is the interval among the submission of a job and its completion. Response time is the interval among submission

What are the allocation methods of a disk space, What are the allocation me...

What are the allocation methods of a disk space? Methods of allocating disk space which are widely in use are a. Contiguous allocation b. Linked allocation c. Indexed

Total physical memory and total virtual memory , A practical task specified...

A practical task specified in the Study Guide, Computer architecture, was to record your computer's specifications. Submit the data you recorded, which will contain the following d

Protection scheme in unix, Q. Consider a system that holds 5000 users. Pre...

Q. Consider a system that holds 5000 users. Presume that you want to allow 4990 of these users to be able to access one file. a. How would you denote this protection scheme in

Difference between two tier and three tier architectures, Question: a) ...

Question: a) Illustrate with the help of a diagram, the difference between two tier and three tier architectures. b) Explain in what kind of environment, a peer to peer envi

Explain fifo page replacement, Explain FIFO page replacement A FIFO rep...

Explain FIFO page replacement A FIFO replacement algorithm associates with every page the time when that page was brought into memory. When a page must be changed, the oldest p

Explain peterson''s solution for the critical section problem, Explain the ...

Explain the Peterson's solution for the critical section problem? In Peterson's solution two variables a) flag and b) turn are used as shared variables. If the both shared vari

Explain the different sections of a process., Explain the different section...

Explain the different sections of a process.     Entry section     Critical section     Exit section     Remainder section Consider a system inclusive of n processe

Define tii stands for, TII stands for The abbreviation of TII is Table o...

TII stands for The abbreviation of TII is Table of incomplete instructions.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd