4
$\begingroup$

I have studied about both of these on many places like this, this and this, but still it is not that much clear that what the actual difference is between these two.

The Wikipedia links (first and second links mentioned above) say about deadlock prevention that:

The hold and wait or resource holding conditions may be removed by requiring processes to request all the resources they will need before starting up (or before embarking upon a particular set of operations)...

and the deadlock avoidance section of the same page says:

Deadlock can be avoided if certain information about processes are available to the operating system before allocation of resources, such as which resources a process will consume in its lifetime...

so almost in both of these situations we require the processes to provide information about resources in advance.

So can anyone kindly explain in easy-to-understand words that what the actual difference is in between both of these.

$\endgroup$
4
$\begingroup$

It seems that deadlock prevention and deadlock avoidance are two names for the same concept. Indeed, the Wikipedia section on deadlock avoidance has been marked as redundant. While the distinction might be taken from the literature, some people at least are arguing that this distinction is superfluous. See the paper The classification of deadlock prevention and avoidance is erroneous by Neumann Levine, which is mentioned in the Talk part of the Wikipedia article.

$\endgroup$
  • $\begingroup$ @ Yuval Filmus: Then what should be the conclusion? :) $\endgroup$ – swdeveloper Mar 21 '16 at 19:19
  • $\begingroup$ I suggest you read the paper by Neumann Levine. $\endgroup$ – Yuval Filmus Mar 21 '16 at 19:20
  • $\begingroup$ @ Yuval Filmus: What about "negating the mutual exclusion?" I mean how do we negate the mutual exclusion? Some people say it is impossible to negate mutual exclusion? Then how do we do that? $\endgroup$ – swdeveloper Mar 21 '16 at 19:53
  • 1
    $\begingroup$ @swdeveloper That's a separate question. The rule here is one question per post. If you're interested, you can ask a different question. $\endgroup$ – Yuval Filmus Mar 21 '16 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.