Deadlock due Fri 20 Mar 11:00

Answer the following questions from the course text book (Operating System Concepts with Java, 8th edition, by Silberschatz, Galvin, and Gagne) found on pages 301-308:

In addition answer the following questions:

  1. Dijkstra's Banker's Algorithm has a number of weaknesses that preclude its effective use in real systems. Comment on why each of the following restrictions may be considered a weakness in the Banker's Algorithm.1
    1. The number of resources to be allocated remains fixed.
    2. Processes guarantee that they will return held resources within a finite amount of time.
    3. Processes must state maximum resource needs in advance.

  2. Suppose an OS has 5 processes ($P_1$, ... $P_5$). There are also 4 shared, non-preemptible resources ($R_1$, ... $R_4$) in quantities of 3, 2, 2, and 2, respectively. Suppose the current state of the OS is as follows:
    Process Has Wants
    $P_1$ 1 $R_1$ 1 $R_1$
    $P_2$ 1 $R_1$; 1 $R_4$ 1 $R_2$
    $P_3$ 1 $R_4$ 1 $R_1$
    $P_4$ 1 $R_2$; 2 $R_3$'s 2 $R_4$'s
    $P_5$ 1 $R_2$ 1 $R_3$
    1. Represent this state as a resource graph.
    2. Reduce the graph to determine whether or not deadlock exists. If so, determine which processes and resources are involved in the deadlock.

Your paper should include your name, the due date, and a list of the exercise numbers assigned. Each answer should be labeled clearly with the exercise number.

Footnotes

... Algorithm.1
This question taken from Operating Systems, 3rd ed., Deitel, et al., p. 326.

Quick Links