From owner-freebsd-hackers Sun Dec 19 21:27:37 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (Postfix) with ESMTP id 03671152BA for ; Sun, 19 Dec 1999 21:26:32 -0800 (PST) (envelope-from rcarter@pinyon.org) Received: (from daemon@localhost) by smtp01.primenet.com (8.9.3/8.9.3) id WAA26352; Sun, 19 Dec 1999 22:26:19 -0700 (MST) Received: from ip-83-008.prc.primenet.com(207.218.83.8), claiming to be "pinyon.org" via SMTP by smtp01.primenet.com, id smtpdAAADGaaxZ; Sun Dec 19 22:26:13 1999 Received: from chomsky.Pinyon.ORG (localhost [127.0.0.1]) by pinyon.org (Postfix) with ESMTP id E078A78; Sun, 19 Dec 1999 22:26:08 -0700 (MST) X-Mailer: exmh version 2.1.0 09/18/1999 To: "Richard Seaman, Jr." Cc: "Ronald F. Guilmette" , hackers@FreeBSD.ORG Subject: Re: FreeBSD Threads (was Re: Practical limit for number of TCP connections?) In-Reply-To: Message from "Richard Seaman, Jr." of "Sun, 19 Dec 1999 17:11:30 CST." <19991219171130.A338@tar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Dec 1999 22:26:08 -0700 From: "Russell L. Carter" Message-Id: <19991220052608.E078A78@pinyon.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG %On Sun, Dec 19, 1999 at 02:49:26PM -0800, Ronald F. Guilmette wrote: % %> I dunno if it goes without saying or not, but this certainly makes %> the current FreeBSD threads implementation highly unpalatable, except %> to support ported code which has been developed elsewhere and which %> is already written to assume the presence/availability of thread %> library primitives. % %I wouldn't go that far. The current implementation is not nearly %as good as it could be, but it works nicely for some reasonable %range of applications. Adding to Richard's comments: libc_r threads work damn fine for wide variety of applications. There are specific user-space issues which preclude using a lot of POSIX RT stuff, and libc_r threads naturally don't scale to multiple processors. But they're relatively lightweight :-). And I believe most of the essential interfaces are there, and not harmful if used. %> Certainly, if I were starting out to write a brand new new multi-threaded %> application program specifically for execution on FreeBSD _today_, I'd %> either (a) wait for the new thread implementation to be ready or else %> (b) not use threads at all. % %If user threads don't work for you, then the linuxthreads port %(uses kernel threads) might. Its a POSIX style pthreads implementation, %so when FreeBSD does "kernel threads", or the equivalent, if should %be as easy (cross your fingers) as recompiling and relinking %to a different library. Yep. You might try the information on www.pinyon.org/ace to see any differences in compilation requirements. %> (Actually, I guess there is a third option, %> i.e. writing my code to use the existing threads API, and then just hoping %> that the new threads implementation shows up before I was done coding my %> application.) I build against both existing interfaces, and adhere to the several POSIX specs. It seems to work fine. Russell To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message