DragonFly kernel List (threaded) for 2003-08
Re: Userland threading and messaging
On Saturday 16 August 2003 03:15 am, Joerg Sonnenberger wrote:
> Hi all,
> after a restless night I had some thought about the userland
> threading. First let's recall our current infrastructure:
> a) the old synchronous syscall interface
> b) the new asynchronous sysmessage interface
> c) LWP aka virtual CPUs
> d) signal trampoline code.
> IMO we want to drop a) and work much like the old MIT (?) pthread
> implementation entirely in userspace. Therefore we have a process
> most if not all syscalls / messages asynchronous. The scheduling
> and esp. the handling of different userland threads needs some
> context switching which could be copied from the kernel. The
> signal code could be reused as upcall mechanism to notify the
> process about POSIX signals, finished messages or want ever we
> want. That's all fine.
What about thread-to-processor binding? For compute-bound programs it is
very nice to be able to explicitly stick threads onto different CPUs.
For that there would need to be some kind of kernel code at least.
chip norkus; renaissance hacker; wd@xxxxxxxx
"question = (to) ? be : !be;" --Shakespeare http://telekinesis.org/