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