-3
$\begingroup$

A Dead-lock in an Operating System is

  1. Desirable process
  2. Undesirable process
  3. Definite waiting process
  4. All of the above

My attempt:

As "If a process is unable to change its state indefinitely because the resources requested by it are being used by another waiting process, then the system is said to be in a deadlock."

So, none option should be true. However, somewhere answer key is given option $(3)$.

Can you explain it, please?

$\endgroup$
7
  • 5
    $\begingroup$ A deadlock is not a process so I've no idea what this question is asking. $\endgroup$ Sep 27, 2016 at 16:11
  • 4
    $\begingroup$ Where is that question coming from? You might need a better textbook. $\endgroup$
    – gardenhead
    Sep 27, 2016 at 16:34
  • 4
    $\begingroup$ These options are using the term "process" in a very liberal way, too much liberal for an OS course where "process" has a precise meaning. I also especially enjoy the "all of the above" option, which implies "a deadlock is a desirable, undesirable process". Logic, begone! ;-) $\endgroup$
    – chi
    Sep 27, 2016 at 16:59
  • $\begingroup$ @gardenhead: Or a better teacher. Option 5 is missing: WTF? $\endgroup$
    – gnasher729
    Sep 28, 2016 at 10:09
  • 1
    $\begingroup$ You could post the question on ell.stackexchange.com (English learners); "deadlock" is one word, "Desirable process" and "undesirable process" are quite meaningless in this context; and "definite waiting process" is absolutely meaningless. None of these is anywhere near explaining what a deadlock is. $\endgroup$
    – gnasher729
    Sep 28, 2016 at 21:27

1 Answer 1

3
$\begingroup$

Your attempt "If a process is unable to change its state indefinitely because the resources requested by it are being used by another waiting process, then the system is said to be in a deadlock." is close, but not quite there.

A deadlock is a situation where one "process" (not a "process" as used in software development, but something more general) is waiting for a resource which will never become available because a second "process" is using the resource, and is waiting directly or indirectly for a resource that the first process is already using.

A situation where the second process doesn't stop using the resource just for the heck of it isn't a deadlock. A similar situation where the resource stops getting used, but everytime it stops being used some other process is quicker using it, is also not a deadlock (but an example of resource starvation, which is more general than deadlock).

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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