Re: How to programmatically avoid deadlock?
- From: David Hopwood <david.nospam.hopwood@xxxxxxxxxxxxxxxx>
- Date: Tue, 27 Jun 2006 16:42:13 GMT
Vladimir Frolov wrote:
youpak wrote:
How to programmatically avoid deadlock?
Igor Odintcov wrote about it in his book "Professional programming.
System approach".
Here is free translation from russian:
There are four necessary conditions for deadlock to appear:
1. Condition of mutal execution (threads require exclusive resource
ownership).
2. Condition of waiting (threads hold some owned resource and wait to
own other one).
Note that this means a blocking wait, where the thread suspends until
the wait finishes.
A non-blocking wait (where the thread can do other things while waiting)
does not lead to deadlock. This is the approach used by event-loop
concurrency, as explained in Mark Miller's thesis that I referenced in
my other reply.
3. Condition of undistributed resources (resource cannot be taken away
while it will not be released by owner thread).
4. Condition of cycled waiting (There are circle of threads where one
thread holds one or more resources which is required by next one).
--
David Hopwood <david.nospam.hopwood@xxxxxxxxxxxxxxxx>
.
- Follow-Ups:
- Re: How to programmatically avoid deadlock?
- From: Vladimir Frolov
- Re: How to programmatically avoid deadlock?
- References:
- How to programmatically avoid deadlock?
- From: youpak2000
- Re: How to programmatically avoid deadlock?
- From: Vladimir Frolov
- How to programmatically avoid deadlock?
- Prev by Date: Re: How to programmatically avoid deadlock?
- Next by Date: Re: How to programmatically avoid deadlock?
- Previous by thread: Re: How to programmatically avoid deadlock?
- Next by thread: Re: How to programmatically avoid deadlock?
- Index(es):
Relevant Pages
|
Loading