Question: IV. Consider the following program: Note that on line 4 , (pid != fork () ) in the same line executes the fork, assigns the


IV. Consider the following program: Note that on line 4 , (pid != fork () ) in the same line executes the fork, assigns the return value to pid and uses that return value to evaluate the condition to see whether to go into the if statement or not. a. How many processes are created in this program? Explain. (2 points) b. (2 points) Draw the process tree diagram c. List all the possible outputs of the program. (2+1 bonus points) d. ( 2.5 points) If we delete line 15 (the waitpid) show one output that is possible in the new program that is not possible in the old program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
