Question: Using Ubuntu perform the following operations and answer the questions: Look at the code for Sample Program until you understand it. Sample Program #include #include
Using Ubuntu perform the following operations and answer the questions:
Look at the code for Sample Program until you understand it.
Sample Program
#include
int main(int argc, char* argv[]) { int i, limit;
if (argc < 2) { fputs("Usage: must supply a limit value ", stderr); exit(1); } limit = atoi(argv[1]);
fork(); fork(); printf ("PID#: %d ", getpid()); for (i=0; i 1. Create a diagram illustrating how Sample Program 2 executes. I.e. give a process hierarchy diagram (as described in class and in your textbook). 2. In the context of our classroom discussions on process state, process operations, and especially process scheduling, describe what you observed and try to explain what is happening to produce the observed results.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
