Assignment 3

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Chapter 3 Questions

Question 1

Using the program shown in Figure 3.30, explain what the output will be at LINE A.

Answer

Question 2

Including the initial parent process, how many processes are created by the program shown in Figure
3.31?

Answer

Question 3

Original versions of Apple’s mobile iOS operating system provided no means of concurrent processing.
Discuss three major complications that concurrent processing adds to an operating system.
Answer

Question 4

Some computer systems provide multiple register sets. Describe what happens when a context switch
occurs if the new context is already loaded into one of the register sets. What happens if the new
context is in memory rather than in a register set and all the register sets are in use?

Answer:

Question 5

When a process creates a new process using the fork() operation, which of the following states is shared
between the parent process and the child process?

a. Stack
b. Heap
c. Shared memory segments

Answer

Question 8

Describe the actions taken by a kernel to context-switch between processes.

Answer

Question 9

Construct a process tree similar to Figure 3.7. To obtain process information for the UNIX or Linux
system, use the command ps -ael. Use the command man ps to get more information about the ps
command. The task manager on Windows systems does not provide the parent process ID, but the
process monitor tool, available from technet. microsoft.com, provides a process-tree tool.

Answer

Question 10

Explain the role of the init (or systemd) process on UNIX and Linux systems in regard to process
termination.

Answer
Question 11

Including the initial parent process, how many processes are created by the program shown in Figure
3.32?

Answer

Question 12

Explain the circumstances under which the line of code marked printf("LINE J") in Figure 3.33 will be
reached.

Answer

Question 13

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.)
Answer

Question 16

Using the program shown in Figure 3.35, explain what the output will be at lines X and Y.

Answer

Question 17

What are the benefits and the disadvantages of each of the following? Consider both the system level
and the programmer level.

a. Synchronous and asynchronous communication


b. Automatic and explicit buffering
c. Send by copy and send by reference
d. Fixed-sized and variable-sized messages

Answer

You might also like