What is deadlock? How do you avoid it?

Answer Posted / manzoor elahi laskar

A deadlock is a situation in which two computer programs
sharing the same resource are effectively preventing each
other from accessing the resource, resulting in both
programs ceasing to function.
In order for deadlock order to avoid deadlock following
cases must be avoided.

• Mutual exclusion -a resource that cannot be used by
more than one process at a time. (Two processes cannot
simultaneously control the same resource or be in their
critical section).
• Hold and Wait - processes already holding resources
may request new resources
• No preemption - Once a process holds a resource, it
cannot be taken away by another process or the kernel.
• Circular wait - Each process is waiting to obtain a
resource which is held by another process.

Is This Answer Correct ?    50 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you crash a computer?

511


Can you just explain about memory management in iOS?

624


How do I combine multiple folders on a mac?

529


Which is your favorite editor, shell, programming shell and why?

2072


When I press power button on laptop nothing happens?

471






What's the best operating system?

579


Is kernel a os?

510


How do I merge folders on mac?

528


Dear All, When the patches are installed in the server OS, how will we know that which patch is the latest patch?

1725


How do you find out computer specs?

499


Is chrome an operating system?

523


Is more ram better for streaming?

484


Why is my computer so slow?

540


How do you reset the bios?

544


What do you mean by Run time Errors?

703