Re: kernel thread support - LWP's
Darren Reed (avalon@coombs.anu.edu.au)
Thu, 15 Jul 1999 14:39:13 +1000 (EST)
In some mail from Larry McVoy, sie said:
>
> : Are there plans in the near future to support proper LWP's in the Linux
> : kernel ? By this I mean multiple threads of execution within the same
> : process id, not multiple processes sharing the same VM, etc. Can I
> : encourage whoever is considering doing this that it would be a very
> : good thing to do ? :)
>
> Sure you could if you had so much as a shred of data which supported
> the idea that it would be a good thing to do. In a short discussion I
> had with Linus about this a month or so ago, he pointed out something
> that should have been obvious, that cloned processes which share VM
> also share the page tables and hence the TLB resources. Why is that
> important? Because it was the one remaining thing that I could see as
> a legit argument for supporting LWPs. Given that that isn't an issue,
> can you think of a single technical reason why LWP's would be better?
>
> I'll warn you up front that I've chewed over this topic at length with
> people like Steve Kleiman, the architect of the the Solaris threading
> model and the guy that taught me much of what I know about operating
> systems, and even he isn't convinced that Solaris model is worth it.
> If the clone() model had been around, I'm 90% sure he would have gone
> with that.
Do you have any inklings as to why they'd have gone this way ?
> So do you have any supporting data which makes a case that LWP's would
> be better than the current model? I'm willing to believe there is such
> data, but at this point I'm at a loss as to what it could be.
Hmmm. I can't claim to have any better exposure than yourself, I was
asking more from a consumer point of view.
My perspective on LWP's is from a Solaris background so your comments are
very interesting, indeed, given the respect the Solaris model has earned.
I think the differences I see aren't so much technical as the way they're
interacted with (and perceived by someone who's been around Unix too long).
For example, I'd expect a ps (or ls in /proc) to list LWP's as separate
processes (I assume), when it ought not to. The impression of different
pid's is of different processes, which the clone model breaks.
Cheers,
Darren
p.s. one person I've spoken to claimed that the Linux clone implementation
breaks some aspect of signal handling/delivery but that may just as well be
rhumour.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/