Re: Alan Cox quote?

Kai Henningsen
2001-06-19T18:07:51Z

lm@bitmover.com (Larry McVoy) wrote on 19.06.01 in <20010619090956.R3089@work.bitmover.com>:

> Another one that I can't believe I forgot is from Rob Pike:
>
> "If you think you need threads then your processes are too fat"
>
> And one from me:
>
> ``Think of it this way: threads are like salt, not like pasta. You
> like salt, I like salt, we all like salt. But we eat more pasta.''
>
> Threads are a really bad idea. All you need are processes and either the
> ability to not fork the VM (Linux' clone, Plan 9's rfork) or just good
> old mmap(2). If you allow threads then all you are saying is that your
> process model is so pathetic you had to invent another, supposedly lighter
> weight, object to do the same thing.

The funny thing here, Larry, is that to most people (who aren't OS gurus),
Linux' clone or Plan 9's rfork *are* threads.

I certainly agree that you don't necessarily need two different kernel-
level kinds of things, but really, most of the time when people talk about
threads, they don't care one whit how their libraries manage to produce
threads, as long as those threads actually work.

Threads are a kind of abstraction.

And the argument that you don't need threads when you have state machines
is exactly as valid as the one that says that you don't need loops when
you have goto.

Oh, you also don't need subroutines when you have state machines and goto.
Fancy that!

I've even been told you can do all these things with nothing more than a
Turing machine ...

MfG Kai