CSE120  Problem Set 8 for Discussion Section - Nov 29th


From chapter 6 of text book
 

Problem 1:

two or more arcs from a square node to circle nodes is illegal. Arcs from square to square or circle to circle are also illegal.

Problem 2:

The process is asking for more resources than the system has and it in impossible.

Problem 3:

There is no circular wait in either case and therefore, neither change leads to deadlock.

Problem 4:

If a system has two or more CPUs, two or more processes can run in parallel leading to diagonal trajectories.

Problem 5:

Yes. We need 3 dimensional plot with say, z axis indicating the progress of the third process.

Problem 6:

The exact instant of time when a resource is needed by a process must be known in advance for scheduling and such information is impractical to obtain.

Problem 7:

D asking for one more resource is unsafe. C asking is safe.

Problem 8:

No. D can finish and then E (or A) and so on.

Problem 9:

For n<6 ( unto 5 processes), the system is deadlock free.

Problem 10:

    has          needs    
A  2 0 0 0      1 0 2 0
B  1 0 0 0      0 1 3 1     available = [ 0 1 2 1 ]
C  0 1 2 1      1 0 1 0

The above is not safe, not deadlocked. If A asks for all remaining, we have a deadlock. Safety is a sufficient condition for no deadlock but it is not necessary.

Problem 12:

The two account numbers must be asked for in the order smaller number first and higher number next. This way deadlock is avoided (circular wait not possible).

Problem 13:

m x n**2.