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

Explain memory management using bit maps, MEMORY MANAGEMENT USING BIT MAPS ...

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 properties of distributed operating system, Define properties of Dis...

Define properties of Distributed operating system Distributed:- This system distributes computation among several physical processors. The processors do not share memory or a

What are the benefits of thread pools, What are the benefits of thread pool...

What are the benefits of thread pools:- The benefits of thread pools are 1. It is usually faster to service a request with an existing thread than waiting to make a thread.

Why global variables are unacceptable, Why Global variables are unacceptabl...

Why Global variables are unacceptable Global variable, for instance, are unacceptable because they break the rules of self - containment. If all procedural components are runni

Define the division of labour between client and server, Define the Divisio...

Define the Division of Labour between Client and Server Given our definition of client - server as the interaction between dispersed application logic components it must be not

What do you meant by the term ergonomics, Question 1: "Three entities m...

Question 1: "Three entities must be accountable and responsible for accident prevention." (a) List and explain these three entities. (b) Discuss the role of workers in ma

Define secondary memory, Define secondary memory. This memory holds tho...

Define secondary memory. This memory holds those pages that are not there in main memory. The secondary memory is usually a high speed disk. It is called as the swap device, an

What inference does recovery in distributed systems, Q. Consider a distrib...

Q. Consider a distributed system with two sites A and B. Consider whether site A can distinguish among the following: a. B goes down. b. The link between A and B goes down.

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