Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2: (10 points): The following C program is executed on a LINUX OS. The system calls never fail and function g never returns (we
Part 2: (10 points): The following C program is executed on a LINUX OS. The system calls never fail and function g never returns (we do not know how g is implemented under the hood, we just assume in this case that it is something like a black hole the process that called it will not exit because the function does not return. Hence, the processes created in this program come to a permanent state.). The initial process executing the code arrives at line /* 22 */ in less than 5 seconds. The PIDs assigned by the system to the new processes are incremented by 1. Parent process PID ==1000. Draw the associated process tree in its final form, i.e., when processes have reached steady state. Explain how it arises. For every node, highlight the sys call/function that the related process executes, along with the arguments. Complete the process tree to illustrate Inter-process communication (IPC): for each data or signal transfer occurred, draw a dotted arrow from the sender to recipient process. Above the arrow type the value that is transferred each time (what you read below is only pseudo-code). int i, j, n, fd[3][2]; pid_t p[3]; for (i = 0; i 0) write(fd[i - 1][1], &n, sizeof(n)); read(fd[i][0], &n, sizeof(n)); for (j = 0; j 0) write(fd[i - 1][1], &n, sizeof(n)); read(fd[i][0], &n, sizeof(n)); for (j = 0; j<><>
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