Re: The LINUX operating system handles deadlock by ?
- From: Jean-David Beyer <jdbeyer@xxxxxxxxxxx>
- Date: Wed, 18 Jan 2006 07:12:35 -0500
Peter T. Breuer wrote:
> Floyd L. Davidson <floyd@xxxxxxxxxx> wrote:
>> "lnzju" <geniuslee@xxxxxxxxx> wrote:
>>> a) prevention b) avoidance
>>> c) detection d) none of the above
>
>> Define what "deadlock" means to you.
>
> Is it
>
> a) atempting to read two files at the same time from within
> different processes, when one process has a file lock on the file
> or a region of it, and the other has decided to respect that lock,
> but the first process is waiting for the second process to terminate.
>
> b) two processes waiting for each other to terminate before they die.
>
> c) two kernel threads which have taken the first of two kernel
> spinlocks one under the other, in opposite order.
>
> d) none of the above.
>
> Or (e) waiting for an answer to this question while the answerers
> are waiting for a clarification from the prof who set it ...
>
> Peter
My guess is that in the usual case it is up to the user to recognize it and
kill one (or more) of the deadlocked processes. Why does the O.P. not just
write a little test program and see if Linux does anything at all in the
cases of interest?
I know IBM's DB2 dbms that runs in Linux for sure because I am running it,
has a separate process that just runs all the time detecting deadlocks. It
then just kills one (or more) of the deadlocked transactions to break it.
The deadlocked applications receive an error return from the broken
transaction, and they can just retry it (as the other application would
probably have completed it). I imagine this happens at the point where a
COMMIT is issued in the application, so all the heavy lifting has already
been done.
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 07:05:01 up 19 days, 21:52, 6 users, load average: 4.34, 4.21, 4.18
.
- Follow-Ups:
- Re: The LINUX operating system handles deadlock by ?
- From: Robert Hull
- Re: The LINUX operating system handles deadlock by ?
- References:
- The LINUX operating system handles deadlock by ?
- From: lnzju
- Re: The LINUX operating system handles deadlock by ?
- From: Floyd L. Davidson
- Re: The LINUX operating system handles deadlock by ?
- From: Peter T. Breuer
- The LINUX operating system handles deadlock by ?
- Prev by Date: Re: The LINUX operating system handles deadlock by ?
- Next by Date: Re: Crontab Question
- Previous by thread: Re: The LINUX operating system handles deadlock by ?
- Next by thread: Re: The LINUX operating system handles deadlock by ?
- Index(es):
Relevant Pages
|
|