[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: back-bdb deadlocks
At 08:11 AM 2002-01-18, Lawrence Greenfield wrote:
> Date: Fri, 18 Jan 2002 07:54:24 -0800
> From: "Kurt D. Zeilenga" <Kurt@OpenLDAP.org>
>[...]
> >Must have something to do with thread scheduling
> >algorithms... With usermode threads you also need aio support, otherwise
> >any blocking I/O blocks all threads, making you effectively
> >single-threaded.
>
> Not when using FreeBSD pthreads... the library properly transfers
> control to another thread if the I/O operation would block.
> (Of course, if the kernel blocks where it shouldn't then the
> process will block, but as far as I can tell.)
>
>Unless FreeBSD pthreads use a non-standard Unix API, there's no way to
>avoid blocking on disk i/o. The standard user-mode thread packages
>all block on disk i/o, as there's no portable way to avoid it.
When Howard used the term "any blocking I/O", I assumed he
was referring the Unix (POSIX) blocking v. non-blocking API.
My answer is in that context.
Obviously, where there is one execution context and the
application in a system call, the application is blocked
until the system call returns.
But we digress, the point I was trying to make Howard was that for
slapd/back-bdb under FreeBSD pthreads isn't effectively single
threaded That is, deadlock can occur and in fact does occur.
Kurt