CSC 553 - Operating Systems

Dr. R. M. Siegfried

Assignment #6 - p. 304-305/6.1, 6.5

Due Wednesday, October 11, 2023

6.1

Show that the four conditions of deadlock apply to figure 6.1a (the third slide of Lecture 6).

6.5

Given the following state for the Banker's Algorithm:

Available
A B C D
6 3 5 4
Current Allocation
Process A B C D
PO 2 0 2 1
P1 0 1 1 1
P2 4 1 0 2
P3 1 0 0 1
P4 1 1 0 0
P5 1 0 1 1
Maximum Demand
Process A B C D
PO 9 5 5 5
P1 2 2 3 3
P2 7 5 4 4
P3 3 3 3 2
P4 5 2 2 1
P5 4 4 4 4

Need is Maximum Demand - Current Allocation

  1. Verify that the Available array has been correctly calculated.
  2. Calculcate the Need matrix
  3. Show that the current state is safe, i.e, show a safe sequence of processes. In addition, to the sequence show how the Available (working array) changes as each process terminates.
  4. Given the request (3, 2, 3, 3) from Process P5. Should this request be granted? Why or why not?

[Back to the Assignments Index]