There is a deadlock b/w 2 threads in a process
True .
Between 2 threads of a process, deadlock possible .
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, it need to be waiting for another resource that it is holding.
In addition , deadlock is possible between two threads in a process, because it is the process that holds resources, and the thread that holds resources are lightweight process only , each thread inside a process has access to the resources held by that particular process.
Deadlock occurs with single resource ?
False.
With a single resource for 2 competing process deadlock can not possible , as any one process can take that resource and execute , other process starve for some time but not in deadlock.
With a single resource for more than 2 competing process again deadlock Not possible, as any one process take the resource and execute then release so other process starve for some time but they are not in deadlock.