Parent and child process communicate in unix, Operating System

Assignment Help:

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


Related Discussions:- Parent and child process communicate in unix

What is meant by the term affinity in processor sheduling, Question: (a...

Question: (a) Answer the following questions based on the code snippet below. 1. int main (int argc, char *argv[]) 2. { 3. 4. pid_t processId; 5. 6. processId =

Factors involved in choosing the host operating system, 1. How is reliabili...

1. How is reliability enhanced with the microkernel approach to system design?  2. In a virtual machine design where guest operating systems are independent virtual machines sup

Benefits of virtual memory, Q.  When virtual memory is executed in a comput...

Q.  When virtual memory is executed in a computing system there are convinced costs associated with the technique and certain benefits. List the costs as well as the benefits. Is i

How program execute in operating system, Q. How Program execute in operatin...

Q. How Program execute in operating system? Program execution: Operating system loads a program in memory and executes the program. The program should be able to end its exec

Explain basic file system file system architecture, Basic File System ...

Basic File System Uses the specific device driver. Deals with blocks of data that are exchanged with the physical device. Concerned with the placement of blocks on

Can broadcast packets pass between networks, Q. Why would it be an awful id...

Q. Why would it be an awful idea for gateways to pass broadcast packets between networks? What would be the merite of doing so? Answer: All broadcasts would be spreads to all

What is the use of fork and exec system calls, What is the use of fork and ...

What is the use of fork and exec system calls? Fork is a system call by which a latest process is created. Exec is also a system call, which is used after a fork by one of the

What do you understand by active directory domain, Question: a) What ...

Question: a) What do you understand by Active directory domain in Windows Server 2008? Support your answer with a diagram. b) Distinguish between active directory trees

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