From owner-freebsd-threads@FreeBSD.ORG Sun Feb 1 04:27:06 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40BF316A4CF for ; Sun, 1 Feb 2004 04:27:06 -0800 (PST) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id E046943D46 for ; Sun, 1 Feb 2004 04:27:03 -0800 (PST) (envelope-from pete@he.iki.fi) Received: from he.iki.fi (localhost [127.0.0.1]) by silver.he.iki.fi (8.12.9p2/8.11.4) with ESMTP id i11CQXgr017716; Sun, 1 Feb 2004 14:26:42 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <401CF041.1050301@he.iki.fi> Date: Sun, 01 Feb 2004 14:25:37 +0200 From: Petri Helenius User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: pthread_create() blocks if maxthreads reached? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2004 12:27:06 -0000 Julian Elischer wrote: > Your threads are all waiting in the kernel. > >If you used a blocked semaphore or some other non-kernel >method of blocking then you would discover that you could do more >or you could allow more threads to enter the kernel at a time >but that would be a poor use of resources.. it is much more > > Are you saying that using poll() and serving descriptors sequentially is significantly more resource-effective than creating thread blocked on read for each fd? Pete