Admittedly detecting deadlock is not trivial in general.  But if we are
about to panic because of deadlock, then we have already detected
something.  The question now is:  Do we crash the whole system, or just
one or two user processes?

Rahul

> :Since bugs do happen, deadlock can occur in the kernel.
> :
> :Is it not possible in such cases to simply detect the deadlock, and kill
> :one of the user processes involved in the deadlock, thus releasing one
> :of the resources involved in the deadlock?  Then you would log
> :diagnostic information and let the system continue normally....

>     Most of the deadlocks remaining in the kernel are more complex and often
>     cannot be detected without significant new work....
>     Detecting the loop is the hard part.  This is known as 'deadlock 
>     detection'...
...
>     In FreeBSD's case, the issue is somewhat more complex due to things
>     that are not strictly locks causing deadlocks - such as a low memory
>     condition causing a process holding an inode lock to block and then the
>     syncer blocking on the same inode.  The syncer is thus unable to run and
>     thus unable to sync the dirty buffers clogging memory to disk.  Things
>     like that.
> 
>                                                       -Matt


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to