Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 1999 22:26:08 -0700
From:      "Russell L. Carter" <rcarter@pinyon.org>
To:        "Richard Seaman, Jr." <dick@tar.com>
Cc:        "Ronald F. Guilmette" <rfg@monkeys.com>, hackers@FreeBSD.ORG
Subject:   Re: FreeBSD Threads (was Re: Practical limit for number of TCP  connections?)
Message-ID:  <19991220052608.E078A78@pinyon.org>
In-Reply-To: Message from "Richard Seaman, Jr." <dick@tar.com>  of "Sun, 19 Dec 1999 17:11:30 CST." <19991219171130.A338@tar.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
%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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991220052608.E078A78>