Re: Kernel threads

[ Available lists | Index of freebsd-hackers | Month of Dec 1999 | Week of 27 Dec 1999 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Kip Macy <kip@lyris.com>
Date
27 Dec 1999 09:35:10
Subject
Re: Kernel threads
Message-ID
Pine.SOL.4.05.9912270929080.24373-100000@luna.lyris.com

In reply to

[ Hide this part ]
The words "POSIX threads" only describes the API. It says nothing about
the implementation. On FreeBSD they are non-preemptive user level threads
(your main was never yielding so the thread you launched did not get any
time). On Linux they are processes sharing the same virtual memory space,
and are referred to as kernel threads. For compute bound activities you
want kernel threads to spread the computation over multiple processors.
For I/O bound activities you want user level threads so you can minimize
the context switch overhead. I am sure Julian and the others have
something a little bit better thought out to say but that is my two cents.

-Kip
>
> But on experimenting on this topic I exchanged the sleep() call
> with a "while(1);" and had to see that the programm doesn't work
> any more.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Elapsed time: 0.123 seconds