From owner-freebsd-hackers@FreeBSD.ORG Fri May 23 23:39:06 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 05A5837B401 for ; Fri, 23 May 2003 23:39:06 -0700 (PDT) Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 799EA43FA3 for ; Fri, 23 May 2003 23:39:05 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by attbi.com (rwcrmhc53) with ESMTP id <2003052406390405300p2u1me>; Sat, 24 May 2003 06:39:05 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA96628; Fri, 23 May 2003 23:39:04 -0700 (PDT) Date: Fri, 23 May 2003 23:39:03 -0700 (PDT) From: Julian Elischer To: Valentin Nechayev In-Reply-To: <20030524061631.GA3167@iv.nn.kiev.ua> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: Dan Nelson cc: Daniel Eischen 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:39:06 -0000 On Sat, 24 May 2003, Valentin Nechayev wrote: > 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? no, PROCESS scope threads can block and control will return to the userland thread scheduler to allow it to schedule another thread. In other words, the two read()s are independent of each other. > > > -netch- > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >