Parent and child process communicate in unix, Operating System

Parent and Child process communicate in unix

A child and parent can interact through any of the normal inter-process communication schemes (pipes, message queues, sockets, shared memory), but also have some special paths to interact that take advantage of their relationship as a child and parent. 

One of the most general is that the parent may act the exit status of the child.  Since the child adds file descriptors from its parent, the parent may start both ends of a fork, pipe, then the parent close one part and the child close the other part of the pipe. This is what occurs when you call the popen() routine to execute another program from within yours, i.e. you may write to the file descriptor given from popen() and the child process looks it as its stdin, or you may read from the file descriptor and look what the program wrote to its stdout. 

 

106_parent child process communication.png

Posted Date: 7/28/2012 8:30:44 AM | Location : United States







Related Discussions:- Parent and child process communicate in unix, Assignment Help, Ask Question on Parent and child process communicate in unix, Get Answer, Expert's Help, Parent and child process communicate in unix Discussions

Write discussion on Parent and child process communicate in unix
Your posts are moderated
Related Questions
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


Write a note on multithreading. Multithreading is the capability of an operating system to execute different parts of a program called as threads, at the same time. The program

What is internal fragmentation? Consider holes of 20k assume the process requests 18 bites. If we allocate accurately the request block, we are left with a hole of 2k. The over

Question 1: a) State the different file attributes and briefly explain the operations that can be performed on each files. b) What is a semaphore? Describe why it is impor

Explain a working of file control block A file control block (FCB) has information about the file, containing ownership, permission, and location of the file contents. The log

When you run a program on your UNIX system, the system prepares a special environment for that program. This environment owns everything needed for the system to execute the progra

What is reference string We evaluate an algorithm by running it on a definite string of memory reference and computing the number of page faults. The string of memory reference

SEGMENTATION HARDWARE An execution to map two-dimensional user-defined addresses into one-dimensional physical addresses. This mapping is affected by means of segment table. Ev

What are the different methods for handling deadlocks? Deadlock detection and recovery: Permit the system to enter a deadlock state, detect it and after that rec