From owner-freebsd-hackers Fri Jul 28 8:38:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id 4F6AA37C2E6 for ; Fri, 28 Jul 2000 08:38:18 -0700 (PDT) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id JAA14227; Fri, 28 Jul 2000 09:38:09 -0600 (MDT) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id JAA22915; Fri, 28 Jul 2000 09:38:03 -0600 (MDT) (envelope-from nate) Date: Fri, 28 Jul 2000 09:38:03 -0600 (MDT) Message-Id: <200007281538.JAA22915@nomad.yogotech.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: chris@calldei.com Cc: Bjorn Tornqvist , freebsd-hackers@FreeBSD.ORG Subject: Re: BSD,Posix,Linux Threading - Are they really useable? In-Reply-To: <20000728003913.K37935@holly.calldei.com> References: <398111DA.443B41F9@tornqvist.net> <20000728003913.K37935@holly.calldei.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > PosixThreads are userland threads - if one thread blocks on i/o the > > whole process is blocked. Which makes PosixThreads rather useless. > > That is incorrect. FreeBSD's userland pthread implementation > does not block the whole process on I/O. POSIX does not specify > this behavior either. Actually, sometimes it does (for example when reading from an I/O device where select can't be used succesfully). > > FreeBSD Kernel-threads (dunno what they are called actually) can't be > > used natively!? (Searched the archives and found an explanation that the > > only way to access normal kernel SMP-thread functionality is to use > > LinuxThreads) > > FreeBSD's kernel threads are for separate threads of execution > in the kernel and aren't the same thing as threads for a user > process. You're missing the point. He's asking for 'kernel threads' so that multiple independant thread of execution for a given 'userland process' can be running simulataneously (virtually on a UP, and realistically on a MP). Currently, FreeBSD doesn't have any such thing, although there are a number of design documentations on how it would be done, if it were to be done. The recent work that Matt Dillon and Greg Lehey have been doing is intended to make this more possible. > > LinuxThreads: While they are kernel-threads, if one thread receives an > > uncought signal, all threads are killed (as they should be), but the > > resulting coredump is useless since it only captures the state of the > > last-killed-thread (or process or whatever you want to call it. > > LinuxThreads seems like just a big hack...). > > LinuxThreads on FreeBSD cannot be kernel threads because that > would require modifications to our scheduler which simply have > not been made. Not quite. LinuxThreads on FreeBSD *ARE* kernel threads, but they aren't part of the regular kernel because they aren't adequate, and they have the wrong license model to be used by default. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message