Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Nov 1998 07:43:04 +1100 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        lists@tar.com
Cc:        current@FreeBSD.ORG
Subject:   Re: Kernel threading (was Re: Thread Scheduler bug)
Message-ID:  <199810312043.HAA10845@cimlogic.com.au>
In-Reply-To: <199810311956.NAA23144@ns.tar.com> from "Richard Seaman, Jr." at "Oct 31, 98 01:56:47 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Richard Seaman, Jr. wrote:
> Here's what my "poking around" amounts to at this point.  I'd be willing
> to carry it further, if there's interest.  But, I also think that others
> want to see a somewhat different direction (ie. mixed user/kernel threads).
[...]
> My general strategy was this.  I took the existing libc_r code and
> copied it to a new directory.  The "uthread" code was split into 2
> directories:
[...]
> Then, I've created a third directory which contains the kernel thread
> specific code.  I've preserved separate make files so that both user
> thread and kernel thread libraries can be generated useing the same
> "generic" pthread code.
> 
> If this general approach is of any interest, let me know.

Kernel threads should use libpthread and libc, not libc_r. You can't mix
kernel thread syscalls with user-thread syscalls because the styles are
incompatible (blocking vs non-blocking). You can't mix kernel thread
scheduling with user-thread scheduling. It doesn't sound like you have
made any attempt to update the user-space knowledge of the running thread.
As a result you will mix all errno codes and all user-space locking. This
is a fundamental issue that needs to be designed, not hacked.

-- 
John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810312043.HAA10845>