Fast user Space Mutexes (aka Futexes)
hmp at backplane.com
Tue Oct 21 13:13:37 PDT 2003
Matthew Dillon wrote:
Remember everyone that we are talking about two layers in userland
here... the core layer is intended to be the LWKT port and will
include a messaging implementation for all system calls. Then a POSIX
layer will be placed on top of that.
futexes could be integrated into the higher layer (something at the same
level as the POSIX layer). The userland LWKT, with kernel support, will
provide IPC mechanisms if the futex needs it, but this would not prevent
the futex code from spinning or spin/switching (in userland) on a mutex
if it wants to.
Also remember that I would eventually like to move the messaging
implementation for system calls into an intermediate layer that is run
in userland but loaded by the kernel. For now I'm not worried about
that, we can just have the system call messaging layer directly in libcr.
Just for twinkles, I got half of the futex kernel part done
today in the afternoon when I was bored out of my skull. I am
finding the kernel part much more simpler to do, and have put
it into something called libfutex. I shall work on this more,
later on in the week.
Btw, what did you think about adding a lib/ under sys/ ?
hmp at xxxxxxxxxxxxx
More information about the Kernel