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

Write a short note about schedulers, Write a short note about schedulers. ...

Write a short note about schedulers. Processes migrate between the various scheduling queues throughout its life time. The operating system should select for scheduling purpose

Describe the possible rmi invocation semantics, Question: (a) Explain t...

Question: (a) Explain the similarities and differences between two different threads running in the same process and two independent processes. When would you want to use two t

Why do systems store the operating system in firm ware, Q. Why do several s...

Q. Why do several systems store the operating system in firm ware and others on disk? Answer: For certain devices such like handheld PDAs and cellular telephones a disk with

Relationship among the capabilities of domain level j and i, Q. In a ring-...

Q. In a ring-protection system the level 0 has the greatest access to objects and level n (greater than zero) has fewer access rights. The access rights of a program at a partic

What do you mean by system calls, What do you mean by system calls? Sys...

What do you mean by system calls? System calls give the interface among a process and the operating system. When a system call is implemented, it is treated as by the hardware

What is the use of boot block, What is the use of boot block? For a com...

What is the use of boot block? For a computer to begin running when powered up or rebooted it requires having an initial program to run. This bootstrap program tends to be easy

Page-table lookups, How exactly is a page table used to look up an address?...

How exactly is a page table used to look up an address? The CPU has a page table base register (PTBR)which points to the base (entry 0) of the level-0 page table. Each process h

What are the five major activities of an operating system, What are the fiv...

What are the five major activities of an operating system in regard to process management? The creation and deletion of both user and system processes The suspension and res

Unix , A friend has promised to log in at a particular time. However, he ne...

A friend has promised to log in at a particular time. However, he needs to be contacted as soon as he logs in. The shell script checks after every minute whether he has logged in o

Define how to manage the interaction of client and server, Managing the int...

Managing the interaction of client and server  Among the differences between traditional application programs and client server ones is that developers must create a mechanism

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