From owner-freebsd-hackers Mon Dec 27 9:35:10 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from luna.lyris.net (luna.shelby.com [207.90.155.6]) by hub.freebsd.org (Postfix) with ESMTP id 2D6C415056 for ; Mon, 27 Dec 1999 09:35:06 -0800 (PST) (envelope-from kip@lyris.com) Received: from luna.shelby.com by luna.lyris.net (8.9.1b+Sun/SMI-SVR4) id JAA24461; Mon, 27 Dec 1999 09:34:49 -0800 (PST) Received: from (luna.shelby.com [207.90.155.6]) by luna.shelby.com with SMTP (MailShield v1.50); Mon, 27 Dec 1999 09:34:49 -0800 Date: Mon, 27 Dec 1999 09:34:49 -0800 (PST) From: Kip Macy To: Steffen Merkel Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel threads In-Reply-To: <005101bf508e$1ab48700$0201a8c0@blade> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SMTP-HELO: luna X-SMTP-MAIL-FROM: kip@lyris.com X-SMTP-RCPT-TO: d_f0rce@gmx.de,freebsd-hackers@freebsd.org X-SMTP-PEER-INFO: luna.shelby.com [207.90.155.6] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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