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
Explain the Spawnlp Functions Used in the NetWare Spawnlp(flags, execName, arg0,...)  The Spawnlp function is used to load  a NetWare executable file (NLM) specified by exec

Optimal page replacement An optimal page replacement algorithm has the least page fault rate of all algorithms. The algorithm states that a 'replace the page that will not be

Define Virtual memory Virtual memory is employed in all major commercial operating systems

(Add synchronization to your solutions to HW 3 to eliminate all of the race conditions.  You should not remove any of the sleep() commands that you used to produce the race conditi

Networks and operating systems have a lot of overlap. In this course, however,we are not going to discuss networking in detail, but rather focus on the networking abstractions prov

What are interrupts? Interrupts are in some ways the mainly "famous" system resources, ever since almost everyone who's used a computer has heard of them even if they don't k

Q. What resources are utilized when a thread is created? How do they vary from those used when a process is created? Answer: For the reason that a thread is smaller than a pr

Deadlock Detection and Recovery It's a method of permitting the system to enter a deadlock state, detect it and then recover. Deadlock detection : Is the process of

FIFO page replacement This is the easiest page replacement algorithm. At this juncture the 1 st page entering is the 1 st to leave that is the oldest page leaves. To execute

What do you understand by “line balancing”? What happens if balance doesn’t exist?