Interview Question
Software Engineer / DevelopersSuppose There are two processes ..... A and B.
A is accessing memory block a [A->a]
B is accessing memory black b [B->b]
Now A want to use memory block b, but do not want to release a.
Same for B, B want to use memory block a and does not want to release b.
Here deadlock happened. Both processes are waiting to work on memory blocks acquired by other but does not want to release what they are holding.
Solution to this can be, forceful killing of one process, having lower priority.
-Amit
Deadlock occurs - under the following conditions
- Anonymous January 30, 2011a) When there is mutual exclusion
b) when there is hold-and-wait
c) when there is no preemption
d) when there is a circular wait
between processes
Deadlock prevention, deadlock avoidance, deadlock detection and recovery, ignorance