Question: Consider the following program: ` ` ` int a = 7 , f; cout getpid ( ) : a endl; f = fork
Consider the following program:
int a f;
cout getpid: a endl;
f fork;
iff
a;
cout getpid: a endl;
f fork;
iff
a ;
cout getpid: a endl;
else
a ;
cout getpid: a endl;
fork;
a ;
cout getpid: a endl;
Provide the process tree created by this program and determine the output of each process. When displaying the process ID of a process getpid use the following notation: p for the initial process, p for its first child, p for its second child, p for the first child of p and so on
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
