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

What are compile time Errors?

810


How many os are there?

715


How do you remove a virus from your computer?

682


Is chrome os better than windows 10?

686


Assuming feedback to the adversary flugging an error as each incorrect character is entered, what is the expected time to discover the correct password?

3066






Can you just explain about memory management in iOS?

797


How do I clean up and speed up my computer?

682


How can I clean up my computer?

739


In the token-passing mutual exclusion algorithm, is the timestamping used to reset clocks and correct drifts, as in the distributed queue algorithms? if not, what is the function of the timestamping?

2456


What is the most powerful computer in the world 2019?

726


Can you turn on a computer with the keyboard?

649


Can I install chrome os on my laptop?

700


What is a Safe State and what is its use in deadlock avoidance?

748


Where do I find disk cleanup?

699


Explian T - Factor?

801