3

3.11 Explain the role of the init process on UNIX and Linux systems in regard to process termination.
Based on the relationship between a parent and child process, if a parent did not invoke wait() and simply terminated (making child process an orphan), UNIX and Linux Systems assign them as the init process. This process periodically invokes wait(), where it will continue until these orphans finish their final statement before exiting using exit().
3.12 Including the initial parent process, how many processes are created by the program shown in Figure 3.32?
8 processes are created by the program
3.14 Using the program in Figure 3.34, identify the values of pid at lines A, B, C, and D. (Assume that the actual pids of the parent and child are 2600 and 2603, respectively.)
Line A: 0
Line B: 2603
Line C: 2603
Line D: 2600
3.17 Using the program shown in Figure 3.35, explain what the output will be at lines X and Y.
Line X: CHILD: 0 CHILD: -1 CHILD: -4 CHILD: -9 CHILD: -16
Line Y: PARENT: 0 PARENT: 1 PARENT: 2 PARENT: 3 PARENT: 4

x

Hi!
I'm Martha!

Would you like to get a custom essay? How about receiving a customized one?

Check it out