Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2003 05:24:38 -0400 (EDT)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: libpthread patch
Message-ID:  <Pine.GSO.4.10.10304170519410.5432-100000@pcnet1.pcnet.com>
In-Reply-To: <3E9E59B8.455970F2@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10304170519410.5432-100000>