Question: Question. 2 Is it possible for a parent process to wait for the termination of his child process and then to continue working on his

Question. 2

Is it possible for a parent process to wait for the termination of his child process and then to continue working on his own task? How can it be done using threads where a thread could be bound to wait for the termination of another thread and then continue working on his task. Write a piece of code to demonstrate both these cases in a single program.

Question. 4

Is it possible for a process to execute another piece of code instead of its current program? Write all the possible ways that could be adopted in different scenarios and write small pieces of codes to demonstrate each possible scenario. In all the cases, check whether the ids of child and parent process change or remain unchanged

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!