Subject: Re: [linux-audio-dev] Article about multithreading
From: Joe Pfeiffer (pfeiffer_AT_cs.nmsu.edu)
Date: Mon Jun 18 2001 - 02:51:12 EEST
Paul Davis wrote:
> deadlock avoidance is an bit of an illusory goal. there has been some
> mostly theoretical work on such things, but once again, you lose
> performance (a lot, if you use mutexes a lot), and in general, a
> pathological situation can still cause deadlocks that were not found
> by an analytical stage.
Just how bad is this performance penalty ?
Setting a mutex shouldn't be that bad ?
Did you really mean deadlock avoidance, or just mutual exclusion?
Setting a mutex isn't bad, but deadlock avoidance becomes a real mess
that takes a lot of time and makes really poor use of resources
(essentially, whenever one of the tasks wants a mutex you don't just
ask whether the resource is available, you ask whether granting the
mutex might conceivably lead to a deadlock eventually). Deadlock is
really programmer error, so trying to avoid it is a really misplaced
effort.
-- 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
This archive was generated by hypermail 2b28 : Mon Jun 18 2001 - 02:50:07 EEST