What is deadlock? How do you avoid it?

Answer Posted / kavya

deadlock is sate in which each of the process is waiting for other process to complete.
this problem can be solved in two ways
1. deadlock prevention
2. deadlock avoidance
deadlock prevention is to make sure that any of the four necessary conditions for deadlock to occur doesn't hold good.
four necessary conditions are
a) mutual exclusion
only one process at a time can use a resource
b) hold and wait
if process require more resources it must hold the allocated resources and wait for the required resources
c) no preemption
none of resources are taken back by operating system until a process releases it
d)circular wait
all the process are waiting for resources in a circular manner
deadlock avoidance:
In this method data related to process like resources allocated , resources needed, arrival time etc are studied and occurance of deadlock is predicted. If deadlock is in safe state then resources are allocated or else they are not .

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is kernel a os?

684


What do you know about the latest android version Lollipop?

703


How do you kill a computer with command prompt?

683


Can I factory reset my laptop without a recovery disc?

697


Is the g in gnu silent?

697






What is the meaning of slosh login in nfs?

2251


How do I merge folders on mac?

700


Explian T - Factor?

801


Why is android better than ios?

725


How much ram do I need for streaming?

724


wha is very first process created by kernel

773


What are compile time Errors?

809


Can I install chrome os on my laptop?

700


How do you say gnu?

696


why we make plex offline online in vxvm?

2600