[openbeos] Re: scheduler/reminder
- From: Scott Mansfield <thephantom@xxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Wed, 24 Sep 2003 22:53:45 -0700
On Wednesday, Sep 24, 2003, at 19:50 America/Los_Angeles, Lars Hansson
Yes, you said right! KERNEL threads! There aren't USER threads!
What can you do with kernel threads? Nothing! Only the Kernel
Linux doesn't have user threads, at least until 2.6 is released.
Kernel threads are threads that are scheduled by the kernel, they are
not for use only by the kernel. Userland threads are not scheduled by
the kernel but by a userland library, ie they're not real threads. BeOS
threads are kernel threads.
In Linux, there is a distinct difference between kernel- and
application threads right down to synchronization via semaphores,
mutexes, a/o critical sections (IIRC, in Linux kernel space semaphores
and critical sections are one and the same).
This undoubtedly changes with the recent kernels (>2.5.71 IIRC) where
new and more sensible threading is implemented, including userland TLS,
thanks in no small part to Ulrich Drepper's efforts in this area.
'K. 'Nuff said.
Seeking clarification here, pardon my unabashed display of denseness...
I've always thought that there exists a clear, distinct difference
between kernel- and user-space threads and what is allowed to run in
their respective sandboxes. Reading your comment one could draw the
conclusion that this doesn't exist for OBOS because all threads are run
in kernel space ("BeOS threads are kernel threads"), is that so? By
inheritance if I write a multi-threaded userland app, do my app's
threads run in kernel space? If that's the case then sumtin's broken
h'yah WRT kernel/app privilege separation.
Other related posts: