From owner-freebsd-hackers@FreeBSD.ORG Fri May 23 23:18:07 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8E3537B401 for ; Fri, 23 May 2003 23:18:07 -0700 (PDT) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A7C543FAF for ; Fri, 23 May 2003 23:18:05 -0700 (PDT) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id h5O6HgqF090510; Sat, 24 May 2003 09:17:42 +0300 (EEST) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.12.8p1/8.12.8) id h4O6GVT3003301; Sat, 24 May 2003 09:16:31 +0300 (EEST) (envelope-from netch) Date: Sat, 24 May 2003 09:16:31 +0300 From: Valentin Nechayev To: Daniel Eischen Message-ID: <20030524061631.GA3167@iv.nn.kiev.ua> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-42: On Organization: Dark side of coredump cc: freebsd-hackers@freebsd.org cc: Dan Nelson cc: Julian Elischer Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 06:18:08 -0000 Fri, May 23, 2003 at 16:33:07, eischen (Daniel Eischen) wrote about "Re: libkse and SMP (was Re: USB bulk read & pthreads)": DE> I'm not sure if what you meant here, but here's a (hopefully) DE> clearer explanation. DE> All threads that are created with PTHREAD_SCOPE_PROCESS DE> (the default) will run in the same (initial) KSEG. The DE> initial KSEG will have as many KSEs as CPUs by default. DE> When a scope process thread blocks in the kernel, upcalls DE> are made to the originating KSE and a new thread is scheduled. DE> When scope process threads unblock in the kernel, upcalls DE> are made to one or more of the same KSEs within the initial DE> KSEG to notify the library that the threads can be resumed. DE> Each scope system thread gets its own KSE/KSEG pair in which DE> to run. Sorry, I again lost understanding of this ;(( Consider system with single CPU and 2 threads (with process scope) which both calls blocking disk read. Can the second thread block in read() before first thread returns from blocking read()? Or system scope is required for this? -netch-