Re: GNU-Pth and GLIB



Michael Livshin <mlivshin bigfoot com> writes:

> otaylor redhat com writes:
> 
> > User space threads are just not ever going to be as good as native
> > threads
> 
> as good at what?  user-space threads might be actually preferable on a
> non-SMP machine, if only because of the lower thread-switching
> overhead.  so until the vast majority of desktop computers are SMP I
> wouldn't be so sure. ;)

Thread implementations that use some kernel support tend to have
somewhat more predictable behavior; it depends just on how the user
space threads are implemented, but the kernel is generally in a much
better place to arbitrate between threads and handle the proper thread
behavior for system calls then a user-space thread library.

Also, using the OS's native threads (whether they be purely kernel or
hybrid, or even possibly purely userspace) are going to work properly
with the C library which is seldom true for userspace addon
packages. (Threads were basically unusable in Linux until LinuxThread
support was integrated into the C library)

So in some sense I was really comparing native threads to add-on
thread packages, not kernel threads to user-space threads.  I think
almost every decent thread native implementation does have some kernel
support, however.

(Though I'm not a threading expert.)

Regards,
                                        Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]