Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Computer systems.. Please i need each command you use in all parts from a to e . 8- that the main process ask the user
Computer systems..
8- that the main process ask the user to input number of childrern (N) and number of grandchildren for each child (M). Then, the main process creates N child processes and each child creates M grandchild processes. Save the file as "lab3f.c". Show the source file in the report. The output should look like: Enter number of children: 3 Enter number of grand children for each child: 2 Child 1 process ID xxx and its parent process ID xxx Child 2 process ID xxx and its parent process ID xxx. Child 3 process ID xxx and its parent process IDxxx. Grandchild 1 process ID xxx and its parent process fD- xxx Grandchild 2 process ID xxx and its parent process IDxxx Grandchild 1 process ID xxx and its parent process ID xxx Grandchild 2 process ID xxx and its parent process ID xxx Grandchild 1 process ID-xxx and its parent process ID- xxx. Grandchild 2 process ID xxx and its parent procesS ID -xxx. a. Compile and link the file to get the executable "lab3f b. Verify the output using the "ps" command (use sleep to keep the processes alive). c. Draw the corresponding process graph. Show all your work in the report. d. Fill in the following table all other correct outputs other than produced in the sample run. Also fill in which process printed the line (parent, child1, child2,.... Sequence number Output line Which Process t never could be produced by this program. List three such tables. 8- that the main process ask the user to input number of childrern (N) and number of grandchildren for each child (M). Then, the main process creates N child processes and each child creates M grandchild processes. Save the file as "lab3f.c". Show the source file in the report. The output should look like: Enter number of children: 3 Enter number of grand children for each child: 2 Child 1 process ID xxx and its parent process ID xxx Child 2 process ID xxx and its parent process ID xxx. Child 3 process ID xxx and its parent process IDxxx. Grandchild 1 process ID xxx and its parent process fD- xxx Grandchild 2 process ID xxx and its parent process IDxxx Grandchild 1 process ID xxx and its parent process ID xxx Grandchild 2 process ID xxx and its parent process ID xxx Grandchild 1 process ID-xxx and its parent process ID- xxx. Grandchild 2 process ID xxx and its parent procesS ID -xxx. a. Compile and link the file to get the executable "lab3f b. Verify the output using the "ps" command (use sleep to keep the processes alive). c. Draw the corresponding process graph. Show all your work in the report. d. Fill in the following table all other correct outputs other than produced in the sample run. Also fill in which process printed the line (parent, child1, child2,.... Sequence number Output line Which Process t never could be produced by this program. List three such tables Please i need each command you use in all parts from a to e .
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started