httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Hess" <sc...@avantgo.com>
Subject Re: ANNOUNCE: GNU Portable Threads (Pth) 1.2.0 released
Date Fri, 12 Nov 1999 16:07:27 GMT
Ralf S. Engelschall <rse@engelschall.com> wrote:
> Yes, that's the main end-user visible difference between preemptive
> multithreading and non-preemptive multithreading. It is as always in
life: for
> a benefit on the one side (here: great portability) you have to pay a
price on
> the other side (here: no preemption). So your observation is correct, of
> course. If a modules performs very long CPU bursts this doesn't allow
other
> threads to work under Pth. Pth cannot do anything against this. OTOH one
could
> ask whether it is useful to allow modules to perform such long CPU bursts
at
> all ;)

My main concern is not that cooperative multithreading is
better/worse/indifferent as compared to preemptive multithreading.  It's
more that most people are going to assume preemptive, and it will tend to
look preemptive (because web servers are mostly about I/O), but it can be
very easy to break the scheduling assumptions inadvertantly.  [After all,
that's why preemptive threading is hard, because dufus programmers might be
doing literally _anything_ in their thread.]

So if Apache were to recommend Pth for cases where your threading library
is nonexistent or known to be sucky, it should also mention that Pth is not
preemptive.  Perhaps the mention can be phrased in terms of a feature or
something, that doesn't matter to me, I'd just hope for something that
would make me pause to ponder the implications before I dive in.

Later,
scott



Mime
View raw message