What is deadlock? How do you avoid it?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Answer / poonam
when two process wait for each other resources infinitely so the deadlock is occure
Is This Answer Correct ? | 2 Yes | 2 No |
what are Prerequisites to Install Active Directory in windows 2000 server?
How can I reformat my laptop?
How do I combine multiple folders on a mac?
Can you just explain about memory management in iOS?
What is a file in os?
what is multitask win95
What is startup repair on my computer?
Why does kernel panic occur?
Where can I get a free operating system?
One solution for deadlock prevention for dining philosopher's problem
wha is very first process created by kernel
What is the difference between concurrency and parallelism?