[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: deadlock



----- Original Message -----
From: <shyamk@eth.net>
To: <debian-user@lists.debian.org>
Sent: Tuesday, September 25, 2001 6:34
Subject: deadlock


> Please clear these two doubts of mine :
> 2. What is a deadlock ?

I'll answer this one first since it makes more sense.
A deadlock can be defined as blocking stage that processes arrived due to
the fact that they're competing  for the same resources.

> 1. When does a deadlock happen on a Unix/Linux system ?

Here an example:
    Imagine process A has exclusive access to an I/O resource (e.g. a CD-Rom
drive) and needs access to another I/O resource (e.g a floppy-disk drive)
for copying data from the former resource to the latter.
    Now imagine a process B that needs to copy its own data from the first
resource (e.g. the CD-Rom drive) to the second (e.g. the floppy-disk drive),
but in this case, process B grabed the exlusive of the second resource
first.
    Now process A is waiting for the access of the second resource and
process B is waiting for the first resource. So they both enter a block
state called deadlock.
    To handle deadlock there is no efficient solution, only prevention.

Regards,
Ricardo Diz

>
> Thanks,
> (shyamk@eth.net)
> Shyam
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
>



Reply to: