[e-lang] GridLock
Kevin Reid
kpreid at mac.com
Fri Feb 9 08:52:26 CST 2007
On Feb 9, 2007, at 6:55, Dr. Pierre Vignéras wrote:
> Ok, so consider a server which is using a threadpool -- as often --
> for serving its clients. Lets also suppose that one of its service
> is a blocking service that -- for some reasons -- only another
> service can unblock (wait/notifyAll sort of).
>
> Then this implementation is subject to gridlock if the number of
> threads in the threadpool is bounded, isn't it?
Yes.
> By the way, since the number of threads available is always bounded
> (by ulimit or by the available memory), any thead-pooled
> implementation that can serve a blocking call is subject to
> gridlock. Am I right?
It is subject to deadlock if the unblocking is to be performed by a
thread from that pool. If it were instead, say, blocking on a read
from a socket or pipe from another process, or on the activity of a
thread outside of the pool, then there is not necessarily gridlock.
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list