kernel info

Joerg Sonnenberger joerg at
Thu Oct 14 06:47:20 PDT 2004

On Thu, Oct 14, 2004 at 01:09:08PM +0000, Ryan Newman wrote:
> Is DragonFly's kernel preemptive or non-preemptive ?

That's a difficult technical question. The simple answer is no, the
normal kernel is not preemptive, execution of a kernel thread normally
occurs until it returns either to userland or tries to do something
blocking. Think of M_WAITOK allocations or any attemp to get a token.

The more refined answer is partly yes, because interrupts can actually
preempt the active kernel thread, if those are not explicitly masked
via critical sections or splXXX protection. Certain critical subsystems
like the slab allocator for the M_NOWAIT case are non-blocking and
preemption safe.

You can somewhat compare the BSD soft interrupt system with the Linux RT
extensions, as long as the interrupt is not included in any splXXX mask
or the masked areas and all critical sections have a known upper bound,
you get Hard Real Time for that interrupt (thread).


More information about the Kernel mailing list