From owner-freebsd-chat Fri Jul 16 17: 0:18 1999 Delivered-To: freebsd-chat@freebsd.org Received: from shell.webmaster.com (mail.webmaster.com [209.133.28.73]) by hub.freebsd.org (Postfix) with ESMTP id D579914F94 for ; Fri, 16 Jul 1999 16:59:13 -0700 (PDT) (envelope-from davids@webmaster.com) Received: from whenever ([209.133.29.2]) by shell.webmaster.com (Post.Office MTA v3.5.3 release 223 ID# 0-12345L500S10000V35) with SMTP id com; Fri, 16 Jul 1999 16:56:25 -0700 From: "David Schwartz" To: "Terry Lambert" , "Tani Hosokawa" Cc: Subject: RE: Known MMAP() race conditions ... ? Date: Fri, 16 Jul 1999 16:56:24 -0700 Message-ID: <000001becfe6$cfd67a40$021d85d1@youwant.to> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 In-Reply-To: <199907162345.QAA18013@usr05.primenet.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > No, my argument was against getting al het up about FreeBSD not > having kernel threads, or all excited that kernel threads are > somehow important for performance. Agreed. Kernel threads are nice, but they're not vital. And, of course, kernel threads can cause problems in situations that are fine with user-space threads implementations, such as creating 1,000 threads. > > I just thought of another high profile system that uses threads. MySQL. > > It's all threaded. Threads for MySQL are damn cool, 'coz it > leaves a tiny > > memory footprint, especially when compared to other similar systems like > > PostGres that are process oriented. > > Yes. And you'll notice that it runs just fine on FreeBSD. So I guess > FreeBSD does have working threads. It's at least theoretically vulnerable to disk I/O blocking. Unless it does this: > fcntl( fd, F_SETFL, O_NONBLOCK); > > It will return an "EWOULDBLOCK" on a failed attempt to read or write, > which could be reattempted later. Yes, the question is, is this better than kernel threads? I think the answer is a pretty clear NO in many cases for many reasons. This requires a lot more work saving context, for example. > So does nay other pthreads application that conforms to POSIX 1003.1c. > > Any application which doesn't run (e.g. the claims of one thread > blocking all other threads) is, by definition of POSIX 1003.1c, broken. Please, that's not true and I'm pretty sure you know it. 'gethostbyname' and NFS reads are good examples. Unless the user-space threads library wraps all NFS file I/O. Does it? If it does, half my argument goes away. :) > > So? My point is, was, and will be, that FreeBSD doesn't > *currently* have > > good threading. I never said that FreeBSD can't *get* good threading. > > FreeBSD currently has good threading. Agreed. A user-space threads implementation is perfectly fine for a significant fraction of the real uses of threads. Just not all of them. DS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message