Re: [ANNOUNCE] Native POSIX Thread Library 0.1

Olivier Galibert
2002-09-23T19:38:56Z

On Mon, Sep 23, 2002 at 08:30:04AM -0700, Larry McVoy wrote:
> What do you think causes a context switch in
> a threaded program? What? Could it be blocking on I/O? Like 99.999%
> of the time? And doesn't that mean you already went into the kernel to
> see if the I/O was ready? And doesn't that mean that in all the real
> world applications they are already doing all the work you are arguing
> to avoid?

I suspect a fair number of cases is preemption too, when you fire up
computation threads in the background. Of course, the preemption
event always goes through the kernel at some point, even if it's only
a SIGALARM.

Actually, in normal programs (even java ones), _when_ is a thread
voluntarily giving up control? Locks?

OG.