You are on page 1of 2

CS 410 Operating Systems

Homework 04

All the questions are worth 3 pts/ea and the problems 5 pts/ea unless noted otherwise.

Review Questions
Chapter 5
5.1 List four design issues for which the concept of concurrency is relevant.
5.3 What is the basic requirement for the execution of concurrent processes?
5.4 List three degrees of awareness between processes and briefly define each.
5.5 What is the distinction between competing processes and cooperating processes?
5.6 List the three control problems associated with competing processes and briefly
define each.
5.7 List the requirements for mutual exclusion.
5.11 What is a monitor?
5.12 What is the distinction between blocking and nonblocking with respect to messages?

Chapter 6
6.2 What are the three conditions that must be present for a deadlock to be possible?
6.3 What are the four conditions that create deadlock?
6.4 How can the hold-and-wait condition be prevented?
6.5 List two ways in which the no-preemption condition can be prevented.
6.6 How can the circular-wait condition be prevented?

Problems
Chapter 5
5.2. Consider Dekker’s algorithm written for an arbitrary number of processes by changing the
statement executed when leaving the critical section from
turn = 1 – i/* i.e. P0 sets turn to 1 and P1 sets turn to 0 */
to
turn = (turn + 1) % n /* n = number of processes */
Evaluate the algorithm when the number of concurrently executing processes is greater than
two.

5.3. Demonstrate that the following software approaches to mutual exclusion do not depend on
elementary mutual exclusion at the memory access level:
a. The bakery algorithm.
b. Peterson’s algorithm.
5.4. At the beginning of Section 5.2, it is stated that multiprogramming and multiprocessing
present the same problems, with respect to concurrency. This is true as far as it goes. However,
cite two differences in terms of concurrency between multiprogramming and multiprocessing.

5.8. Is busy waiting always less efficient (in terms of using processor time) than a blocking wait?
Explain.

Chapter 6
6.3. For Figure 6.3, provide a narrative description of each of the six depicted paths, similar to
the description of the paths of Figure 6.2 provided in Section 6.1.

6.4. It was stated that deadlock cannot occur for the situation reflected in Figure 6.3. Justify that
statement.

6.5. a. b. c. d. ⇐ (6 pts total)

6.7.

6.15.

6.16. a. b.

6.17.

6.22.

SUBMISSION
Submit a DOCX or PDF document through Western Online with the answers to the questions or
problems typing the corresponding numbers and questions (or at least the numbers) in bold and
in the proper order before your answers.

------------///

You might also like