Re: Threads in linux.

Vladimir Dergachev (vdergach@math.upenn.edu)
Tue, 31 Aug 1999 12:30:48 -0400 (EDT)


On Tue, 17 Aug 1999, Carlos Costa Portela wrote:

> Hello all!
>
> This morning I went to a work-interview. Unfortunately, in that company
> they use WinNT. But, well, they had a good opinion about linux, blah,
> blah, blah...
>
> But the director says me that linux doesn't implement threads, is this
> true?. He said that threads in linux are implemented by a library, not at
> kernel-level.

You probably got some emails already.. But just in case:

Linux kernel has a system call "clone" which does for threads what "fork"
does for processes. The thread library is an interface to this call (which
is programmer friendly) and also some useful functions.

If you think about it the library is always faster than a system call -
because you don't have to make a context switch. In windows (IMHO) the
threads are also provided by a library, which is unfortunately called
"kernel32.dll" adding to the confusion.

The question what constitutes a kernel in Windows 95 is most likely
rather unclear.. DOS isn't a kernel in the full sense of the word. Most
likely some part of windows 95 is doing context switches.

In windows NT the kernel is called mach (it's a microkernel) and thread
support (in terms of user functions) is definetly not in it (except,
maybe, for the clone call).

Vladimir Dergachev

>
> If you can give me more info, please let me know.
>
> Thanks in advance,
> Carlos.
>
> _______Carlos Costa Portela__________________________________________
> | e-mail: ccosta@servidores.net | http://www.registros.net |
> | www: http://ccp.servidores.net | http://www.avisaboe.com |
> |http://compuconsejos.servidores.net| http://moana.servidores.net |
> |__Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|
>
>
> -
> 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/
>

-
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/