Re: [linux-audio-dev] Article about multithreading

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Article about multithreading
From: Joe Pfeiffer (pfeiffer_AT_cs.nmsu.edu)
Date: Tue Jun 19 2001 - 23:13:30 EEST


   Joe Pfeiffer wrote:
> [cut] Deadlock is
> really programmer error, so trying to avoid it is a really misplaced
> effort.

   Yes I see. But I think you mean allowing deadlocks
   to happen and then resolving by backtracking is bad ?
   I don't think "deadlock avoidance" costs, by which
   I mean programming as such that deadlocks _never_ happen,
        and that can be done, the easiest way is to acquire
   all resource before your thread starts, not that is in
   any way achievable generally.

No, that's not what I meant; deadlock avoidance as you're defining it
doesn't cost time, though it will do horrible things to any ability to
interact between the threads (which may be what you mean by there not
being any way to achieve it generally).

I was using the term ``deadlock avoidance'' as it's used in operating
systems; if a process is required to list all of the resources it will
use during its execution in advance, it can then request them as
needed and the system can make sure that allocating a requested
resource can't eventually lead to deadlock. For details, refer to any
OS text.

Your use of the term is related to what's normally called ``deadlock
prevention'' -- placing constraints on the programmer to prevent their
making requests that could result in deadlock. Much cheaper than
deadlock avoidance, but much much worse in terms of resource
utilization.

Backtracking to break deadlocks has a name, too, but I don't remember
it off the top of my head.

-- 
Joseph J. Pfeiffer, Jr., Ph.D.       Phone -- (505) 646-1605
Department of Computer Science       FAX   -- (505) 646-1002
New Mexico State University          http://www.cs.nmsu.edu/~pfeiffer
SWNMRSEF:  http://www.nmsu.edu/~scifair


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jun 19 2001 - 23:11:52 EEST