Re: Alan Cox quote? (was: Re: accounting for threads)

Jonathan Lundell (jlundell@pobox.com)
Tue, 19 Jun 2001 16:56:16 -0700


At 2:15 PM -0700 2001-06-19, David S. Miller wrote:
>Jonathan Lundell writes:
> > It seems to me that the telling argument against threads has much
> > more to do with the potential complexity of the resulting code than
> > with after-all-minor performance considerations.
>
>I don't get this impression, see the stack space memory usage parts
>of this thread, particular some of Larry's postings.

OK, in some contexts, sure. Larry wrote, for example:

> ... It was originally said to some GUI people
> who wanted to use a thread per object, every button, scrollbar, canvas,
> text widget, menu, etc., are all threads. What they didn't figure out is
> that a thread needs a stack, the stack is the dominating space term, and
> they were looking at a typical desktop with around 9,000 objects. Times,
> at that point, an 8K stack. That was 73MB in stacks. Pretty darned stupid
> when you look at it that way, huh?

But so what? That's $16 worth of DRAM (I just checked). Not so bad
*if* threads are otherwise a great solution. I grant that one might
have a pretty tough time making the case, but again, for the right
application, say some app with a dedicated server, 73MB isn't the end
of the world (though I suppose it was at the time...).

Regardless, these discussions tend to end up sounding like (in this
case) "use threads for everything" vs "never ever use threads",
neither of which is likely to fairly represent the views of the
participants. Threads have their place, they can be misused, and
overusing resources is only one of the possible ways to misuse them.

-- 
/Jonathan Lundell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/