On Fri, 7 Apr 2000, Ian C.Sison wrote:
..
> U-uh, I don't agree.  First of all threads on linux is a misnomer
> because it isn't supported by the kernel.  A kludge is done to make it
> seem to be a thread but it is actually a fork in disguise.

It's functionally a thread, and its good enough for MySQL which is one of
the most demanding threaded applications out there.

The reason threads are implemented as processes in Linux is to avoid extra
LWP overhead and to allow threads to be seamlessly distributed over
processors. The context-switch latency on Linux is much less than on other
OS's (see McVoy's lmbench) so there is no time savings in avoiding the
fork, unlike say Solaris where a thread switch takes 1/100th the time of a
full context switch.

> Alan Cox: 
> "posix threads is a braindamaged pile of crap".
> 
> Stephen Tweedie:  "although a lot of the POSIX threads are reasonable,
> things like requiring uid/gid updates to be instantly effective across
> all threads in the process are just insane".
> 
> Linus Torvalds:  "Note that the reason the kernel is not
> POSIX-compliant is: - the POSIX standard is technically stupid. It's
> much better to use a cleaner fundamental threading model and build on
> top of that. - things like the above are just so much better and more
> easily done in user space anyway."

We obviously read the same web pages. The process model Linux uses, while
not 100% POSIX 1003.1 compliant, is more efficient and it can be scaled
across clusters. Check out MOSIX (a Linux kernel fork that allows
processes to be distributed across a NUMA cluster).


---------------------------------------------------------------------
Orlando Andico <[EMAIL PROTECTED]>                   +63   (2) 937-2293
Mosaic Communications, Inc.                        +63 (917) 531-5893
Any sufficiently perverted technology is indistinguishable from Perl.


-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to