[svlug] Re: Thread Programming part 2
tin at le.org
Mon Jun 5 20:17:58 PDT 2000
-----BEGIN PGP SIGNED MESSAGE-----
On Mon, 5 Jun 2000, Dave Zarzycki wrote:
> > Clone() by itself is not thread.
> Well, before we go any further, it's obvious that we disagree on what a
> "thread" is. Would you care to elaborate on your definition of what a
> "thread" is?
In a nutshell, hoping that I don't oversimplify things too much. We may
also consider taking this offline as it drifts off topic for svlug.
A "thread" system call such as clone() is useless by itself without all
the surrounding API(thread library) and kernel supports (IMHO). Secondly,
clone() is just a lightweight process, where the child share memory space,
fd and sig handlers of the parents. A "thread" has these properties,
but also requires other kernel supports that Linux does not provide.
Clone() does not scale as it is currently implemented in the Linux kernel.
The discussions on comp.programming.threads is that thread in Linux break
down when there are lots of threads (over 1000) and multiprocessors.
Yes, now we are getting into deeply religious ground. One in which Linus
does not agree with, ah heresy! :-) It all has to do with the one-to-one
vs. many-to-many threading model.
As it is currently, Linux does not have kernel support for many-to-many
for a pretty good discussion. I know there are people in the Linux
developers group who disagreed with it. As I said, it is deeply
I don't use thread, have never really had a need for it, so don't care
either way. I am sure when I am working on something that requires it,
then I will feel differently :-).
Internet Security and Firewall Consulting
Tin Le - tin at le.org
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the svlug