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

How do you pronounce gnu?

561


What is startup repair on my computer?

566


What are compile time Errors?

620


any body tell me what are the prob's mostly we face and send some critical prob in real time environment in Solaris and veritas (VXVM,VCS)

1813


How do you find out computer specs?

522






How do I clean up and speed up my laptop?

504


How do you say gnu?

531


What is concurrency go?

584


Can I close my computer while updating?

579


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?

2289


Do cores matter for gaming?

562


Can I factory reset my laptop without a recovery disc?

547


How much ram do I need for streaming?

568


How do I combine multiple folders on a mac?

553


How many bytes we can send to apple push notification server in iOS operating system?

625