Is it possible to have a deadlock situation involving only o
Solution
Ans.1) It is not possible to have a deadlock involving only one single process. The deadlock involves a circular “hold-and-wait” condition between two or more processes, so “one” process cannot hold a resource, yet be waiting for another resource that it is holding. In addition, deadlock is not possible between two threads in a process, because it is the process that holds resources, not the thread that is, each thread has access to the resources held by the process.
Ans.2) Necessary conditions
A deadlock situation can arise if and only if all of the following conditions hold simultaneously in a system:
Ans.3) a. The values of Need for processes P0 through P4 respectively are (0, 0, 0, 0), (0, 7, 5, 0),
 (1,0, 0, 2), (0, 0, 2, 0), and (0, 6, 4, 2).
 b. Yes. With Available being equal to (1,5, 2, 0), either process P0 or P3 could run. Once
 process P3 runs, it releases its resources, which allow all other existing processes to run.
 c. Yes, it can. This results in the value of Available being (1, 1, 0, 0). One ordering of
 processes that can finish is P0, P2, P3, P1, and P4.

