Question: #include main() { int pidi, pid2; pidi = fork(); // fork 1 if (pidi > 0) exit (-1); else pid2 = fork(); // fork 2

 #include main() { int pidi, pid2; pidi = fork(); // fork

#include main() { int pidi, pid2; pidi = fork(); // fork 1 if (pidi > 0) exit (-1); else pid2 = fork(); // fork 2 == if (pid2 0) fork(); // fork 3 fork(); // fork 4 } Specify a graph that shows the parent/child relationships among the processes in the above example. Each process should be represented by a node and a parent/child relationship by a directed edge from the parent to the child. Since drawing is somewhat difficult in an online exam, you can use a table to specify the graph: Assume the first process has the process ID "0" and parent process ID Dummy. Use unique integers for the other processes. Also add the values of 'pidl' and 'pid2". (Note: The graph representation is similar to the example in Programming Assignment 1 Part 2)

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!