Purpose:Practice the drawing of a process tree
Instruction:
Draw a process tree for the execution of this program. Use a circle with a fork number inside to represent the node of a process.
/* draw a process tree for the execution of the following program */
main()
{
int c1, c2;
c1 = 0;
c2 = 0;
fork(); /* fork number 1 */
c1 = fork(); /* fork number 2 */
if (c1 > 0)
c2 = fork(); /* fork number 3 */
if (c2 >0)
c2= fork(); /* fork number 4 */
}
Things to submit:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here