What is deadlock? How do you avoid it?

Answers were Sorted based on User's Feedback



What is deadlock? How do you avoid it?..

Answer / kalyani

Deadlock is permanent blocking of the set processes that
either compete for system resources or communicate each
other.
we can avoid deadlock by avoiding the following conditions:
1.Mutual Exclusion
2.Hold and wait.
3.No preemption.
4.circular wait.

Is This Answer Correct ?    101 Yes 12 No

What is deadlock? How do you avoid it?..

Answer / swetcha

A set of processes is deadlocked if each process in the set
is waiting for an event that only another process in the
set can cause (including itself).
To avoid these r the stratagies to be followed


Attacking Mutex condition
Attacking preemption
Attacking hold and wait condition
Attacking circular wait

Is This Answer Correct ?    66 Yes 12 No

What is deadlock? How do you avoid it?..

Answer / 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

What is deadlock? How do you avoid it?..

Answer / sidda pavan

Dead lock,
which stops the further progressing of the processes.
It can be avoided by performing the following

Mutual Exclusion.
Hold and wait.
No preemption.
circular wait.

Is This Answer Correct ?    28 Yes 6 No

What is deadlock? How do you avoid it?..

Answer / sagarika mishra

A set of processes is deadlocked if each process in the set
is waiting for an event that only another process in the
set can cause (including itself).

Waiting for an event could be:

waiting for access to a critical section
waiting for a resource Note that it is usually a non-
preemptable (resource). pre-emptable resources can be
yanked away and given to another.
deadlock avoided by:-
Resource allocation state:
# of available / allocated instances of each type
maximum demand of each process
Safe sequence: For an allocation state, a sequence
hP1; : : : ; Pni is safe if for each Pi, the maximum
resources that
Pi can request can be satised by currently available
resources
+ resources held by all Pj (j < i)
Safe state: System istb in safe state if there exists a safe
sequence consisting of all processes

Is This Answer Correct ?    18 Yes 3 No

What is deadlock? How do you avoid it?..

Answer / nilima islam

A set of processes is in a deadlock state when every process
in the set is waiting for an event that can be caused only
by another process in the set.

We can avoid deadlock by avoiding the following conditions:

1.Mutual exclusion
2.Hold & wait
3.No preemption
4.Circular wait

Is This Answer Correct ?    10 Yes 3 No

What is deadlock? How do you avoid it?..

Answer / 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

What is deadlock? How do you avoid it?..

Answer / ubaid khan yousafzai

the avoidance is that arranging how resources are granted at
run time so as to avoid deadlock
the solution for this is the bankers algorithm

Is This Answer Correct ?    3 Yes 2 No

What is deadlock? How do you avoid it?..

Answer / poonam

when two process wait for each other resources infinitely so the deadlock is occure

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Operating Systems AllOther Interview Questions

How do you reset your computer?

0 Answers  


Who started gnu?

0 Answers  


How do you fix a crashed computer?

0 Answers  


What do you know about the latest android version Lollipop?

0 Answers   Akamai Technologies,


Can I restore my computer to yesterday?

0 Answers  






what is live lock,race condition,starvation?how it work and explain brifly?

3 Answers  


Assuming one link of the Trojan horse copy-and-observe-later chain is broken. There are two other possible angles of attack by Alice: Alice logging on and attempting to read the string directly, and alice assigning a security level of sensitive to the back-pocket file. Does the reference monitor prevent these attacks?

0 Answers  


What does the g in gnu stand for?

0 Answers  


What is the difference between concurrency and parallelism?

0 Answers  


How can I increase storage on my laptop?

0 Answers  


what is multitask win95

0 Answers  


What is a file in computer terms?

0 Answers  


Categories