Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2003 00:37:28 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Daniel Eischen <eischen@pcnet1.pcnet.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: libpthread patch
Message-ID:  <3E9E59B8.455970F2@mindspring.com>
References:  <Pine.GSO.4.10.10304170134240.5665-100000@pcnet1.pcnet.com>

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


> 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?

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E9E59B8.455970F2>