Re: mmap() versus read()

Ulrich Drepper (drepper@cygnus.com)
09 Mar 1998 12:06:43 -0800


Perry Harrington <pedward@sun4.apsoft.com> writes:

> I think everyone will agree that the current clone() method of
> creating threads is costly at best. I think that an LWP
> implementation would be tremendously useful. Solaris doesn't really
> have threads in the kernel (AFAIK), but rather implements LWPs, upon
> which the core of the libthread is implemented as an abstract layer.
> Having LWPs in Linux could prove very useful.

If you followed the thread discussion long enough (very long, in fact,
we started discussing this before the kernel had the clone syscall)
you know that this always was a proposed method. I once wrote a
proposal to follow the model used on Mach systems using upcalls).
This model mixes kernel and user-level threads to get the best of both
worlds.

The problem is that this is complicated and it requires more kernel
changes. E.g., delivering a signal to a specific thread, how do you
want to do this if the kernel does not know about the entities? I
solution is to open the kernel by keeping the process/thread/clone
specific data partly in user-level but you can imagine how problematic
this is.

The alternative to all this is that you have compliant POSIX threads
based on clone() and another library implementing LWP which are not
POSIX compliant threads. Approaches like this exist and you are free
to use them.

-- Uli
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu