Answered step by step
Verified Expert Solution
Link Copied!

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..
Please i need each command you use in all parts from a to e .
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions