Due Date
Beginning of class
Tuesday, April 1st, 2014
Homework Assignment 7
Silberschatz et al, Operating System Concepts,
9th edition, Chapter 7, Deadlock
In a real computer system, neither the resources available nor the demands
ofprocesses for resources are consistent over longperiods (months).
Resources break or are replaced, new processes come and go, new resources
are bought and added to the system. If deadlock is controlled
by the banker's algorithm, which of the following changes can be made
safely (without introducing the possibility of deadlock), and underwhat
circumstances?
Increase Available (new resources added)
Decrease Available (resource permanently removed from system)
Increase Max for one process (the process needs more resources
than allowed, it may want more)
Decrease Max for one process (the process decides it does not need
that many resources)
Increase the number of processes
Decrease the number of processes
Consider a system consisting of seven resources of the same type that are
shared by three processes, each of which needs at most three resources.
Show that the system is deadlock-free.
Consider the following snapshot of a system:
Process
Allocation
Max
Available
A
B
C
D
A
B
C
D
A
B
C
D
P0
0
0
1
2
0
0
1
2
1
5
2
0
P1
1
0
0
0
1
7
5
0
P2
1
3
5
4
2
3
5
6
P3
0
6
3
2
0
6
5
2
P4
0
0
1
4
0
6
5
6
Answer the following questions using the banker's algorithm:
What is the content of the matrix Need?
Is the system in a safe state?
If a request from process P1 arrives for (0,4,2,0), can the request be
granted immediately?