dbms doubt
[closed]

in Databases closed by
291 views
0 votes
0 votes
closed with the note: got the answer
Can there be two processes X and Y such that

a. they suffer from both mutual exclusion and deadlock problem

b. they suffer from deadlock but not mutual exclusion problem

c. they suffer from mutual exclusion but not deadlock problem
in Databases closed by
by
291 views

1 Answer

1 vote
1 vote
Best answer

$a$ and $c$ could be possible. But $b$ can not be possible.


Mutual Exclusion is one of the Necessary Conditions for Deadlock situation on a Resource. 

So, If there is No Mutual Exclusion between Two Processes, then There can not be any Deadlock situation on a Resource.

So, Two Processes $X$ and $Y$ can never suffer from Deadlock situation on a Resource If there is No Mutual Exclusion between Those Processes.


Quick Revision :

Necessary conditions for Deadlock on Resources :

A deadlock situation on a resource can arise if and only if all of the following conditions hold simultaneously in a system:

  1. Mutual exclusion: At least one resource must be held in a non-shareable mode. Otherwise, the processes would not be prevented from using the resource when necessary. Only one process can use the resource at any given instant of time.
  2. Hold and wait or resource holding: a process is currently holding at least one resource and requesting additional resources which are being held by other processes.
  3. No preemption: a resource can be released only voluntarily by the process holding it.
  4. Circular wait: each process must be waiting for a resource which is being held by another process, which in turn is waiting for the first process to release the resource. In general, there is a set of waiting processes, P = {P1P2, …, PN}, such that P1 is waiting for a resource held by P2P2 is waiting for a resource held by P3 and so on until PN is waiting for a resource held by P1.
selected by

1 comment

so options a and c are true. thx @dee :)
0
0

Related questions

0 votes
0 votes
1 answer
3