From owner-freebsd-threads@FreeBSD.ORG Thu Apr 17 02:24:41 2003 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 DEF5E37B401 for ; Thu, 17 Apr 2003 02:24:41 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 466E943FB1 for ; Thu, 17 Apr 2003 02:24:41 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h3H9OeBg006029; Thu, 17 Apr 2003 05:24:40 -0400 (EDT) Received: from localhost (eischen@localhost)h3H9OclW006024; Thu, 17 Apr 2003 05:24:38 -0400 (EDT) Date: Thu, 17 Apr 2003 05:24:38 -0400 (EDT) From: Daniel Eischen To: Terry Lambert In-Reply-To: <3E9E59B8.455970F2@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Xu cc: freebsd-threads@freebsd.org Subject: Re: libpthread patch 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: Thu, 17 Apr 2003 09:24:42 -0000 On Thu, 17 Apr 2003, Terry Lambert wrote: > Daniel Eischen wrote: > > The critical section is to prevent the thread from being > > swapped out by the kernel and sent to another KSE. That's > > it; it's not meant to do the same thing as locking. > > There's per-kse stuff that needs to be accessed that > > isn't correct if the thread gets run on another KSE, > > regardless of whether or not a lock protects it. > > I guess the next question is why thread-lending (ala NT, > MACH, etc.) isn't supportable. It might still be possible; it's just not as easy. > > If it wasn't possible for the kernel to send completed > > threads from one KSE to another (within the same KSE > > group), we probably wouldn't need critical sections > > (at least as currently implemented). > > Is there a particular performance/other reason this is allowed? I dunno. The original Jasone Evans paper didn't allow this, but the Anderson SA paper did (although our version of KSE's is a bit different than SA). -- Dan Eischen