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 is the main function of the memory-management unit? The runtime mapping from virtual to physical addresses is done by a hardware device known as a memory management unit (

Q. Describes responsibilities of the I/O manager? Answer: The I/O manager is responsible for file systems and device drivers and network drivers. The I/O manager keeps follow

Consider a setting where processors are not associated with unique identifiers but the total number of processors is known and the processors are organized along a bidirectional ri

What is contiguous allocation? Allocation of a group of consecutive sectors for a one file.

4. Describe priority scheduling algorithm. Consider the following set of processes. Show the order in which the algorithm will schedule these processes. Assume preemptive and non-p

Question 1 Explain the following with respect to Resource Management in Distributed Systems- Task assignment Approach Load - Balancing Approach Load - Sharing Approach

Describe the purpose of the checkpoint mechanism. How habitually must checkpoints be performed? Explain how the frequency of checkpoints affects: System performance while no

Processes and threads each have their place in multi-programming, generally to hide latency and to maximize CPU utilization. With the continuing spread of multi-core processors in

In the mean while the fork() system call the Kernel creates a copy of the parent process's address space and adds it to the child process. But the vfork() system call do no

Calculate the Average Waiting Time CPU burst time points out the time, the process needs the CPU. The subsequent are the set of processes with their respective CPU burst time (