libpthread patch
Terry Lambert
tlambert2 at mindspring.com
Thu Apr 17 00:39:01 PDT 2003
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
More information about the freebsd-threads
mailing list