Re: The LINUX operating system handles deadlock by ?



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
.



Relevant Pages

  • Re: I agree linux is not for avg. homeuser
    ... detriment to progress in the whole history of the high tech industry. ... Linux just needs to expand into the realm of the rest of the windows ... I am just waiting for the desktop developers ...
    (linux.redhat)
  • Re: opera
    ... > The next version of Eudura will be TB-based, and will work on Linux. ... > am waiting for that almost like I am waiting for my first born (wife ... TB as in Thunderbird? ... to be a base TB with Eudora features as extensions. ...
    (Fedora)
  • connecting USB PDA Linux
    ... Linux finds the thing but I canīt up or download data. ... Sep 14 15:26:28 mycomputer kernel: usb 2-1.1: USB disconnect, ... Sep 14 15:26:28 mycomputer kernel: PocketPC PDA ttyUSB0: PocketPC PDA ... while waiting for /class/tty/ttyUSB0's bus_id ...
    (comp.os.linux.hardware)
  • Re: workqueue deadlock
    ... We have a class of deadlocks where the flush_scheduled_workcaller can get ... Fix this by not holding workqueue_mutex when waiting for a workqueue to flush. ...
    (Linux-Kernel)
  • Re: Problem with tasking when root
    ... > under Linux as a normal user. ... When run as root, it deadlocks at ... One of the conditions for a (Linux, ... respect priority assignments is that it is running as root. ...
    (comp.lang.ada)