From owner-freebsd-hackers Mon May 1 13:17:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id BF20037C264 for ; Mon, 1 May 2000 13:17:18 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id OAA12128; Mon, 1 May 2000 14:17:16 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id OAA18640; Mon, 1 May 2000 14:17:03 -0600 (MDT) Message-Id: <200005012017.OAA18640@harmony.village.org> To: boshea@ricochet.net Subject: Re: Multithreaded server performance Cc: Jason Evans , A G F Keahan , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 24 Apr 2000 01:03:15 PDT." <20000424010315.U337@beastie.localdomain> References: <20000424010315.U337@beastie.localdomain> <3903AEA6.FA7CBBAB@freenet.co.uk> <20000423212115.E31925@sturm.canonware.com> Date: Mon, 01 May 2000 14:17:03 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000424010315.U337@beastie.localdomain> "Brian O'Shea" writes: : I was under the impression that, because user thread scheduling is done : in user mode, a thread that goes to sleep calling a blocking read() : system call will put the entire process to sleep until that read() : returns (and so all user threads in the process will also be blocked). : Is this correct? No. the pthreads wrappers only make you think that you are calling read, when in fact it multiplexes things behind the scenes for you. If one thread is reading, then another thread can be running. All this assumes that drivers implement select/poll correctly and nonblocking I/O is supported as well. Really a slick setup for when you need to do lots of threading, a big pain when you don't due to locking issues that come up when you trie to dice things into too many threads. But I digress. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message