You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Scott Hess <sc...@avantgo.com> on 1999/11/10 16:32:42 UTC

Re: ANNOUNCE: GNU Portable Threads (Pth) 1.2.0 released

Ralf S. Engelschall <rs...@engelschall.com> wrote:
>   The thread scheduling itself is done in a cooperative way, i.e., the
>   threads are managed by a priority- and event-based non-preemptive
>   scheduler.
<snip>
>   PS: You can use GNU Pth as a drop-in replacement for a missing vendor
>       Pthread library to run Apache 2.0 (with one of the threading MPMs
like
>       dexter) and this way get a multithreaded Apache 2.0 running on
usually
>       all Unix platforms - ranging from mostly all ancient Unix flavors
to
>       really all the modern ones.

It seems to me that this only works so long as your modules are written
with cooperative multithreading in mind.  If they simply go off and think
for long periods of time, then, as described, Pth will not allow other
threads to run.  Or am I missing something about your use of
'non-preemptive', here?

[Not trying to shoot you down, just pointing out that there's a potentially
annoying hole in using Pth as your pthreads, versus using MIT pthreads, for
instance.]

Later,
scott



Re: ANNOUNCE: GNU Portable Threads (Pth) 1.2.0 released

Posted by Manoj Kasichainula <ma...@io.com>.
On Wed, Nov 10, 1999 at 07:32:42AM -0800, Scott Hess wrote:
> It seems to me that this only works so long as your modules are written
> with cooperative multithreading in mind.

My understanding is that the pthreads spec doesn't require preemptive
scheduling, so a program designed to run on any pthreads-standard
system has to deal with this case.

I might be confusing pthreads with Java, though; I haven't found any
statement one way or the other on this for pthreads.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/