Kernel Preemption on FreeBSD

No. From "The Design and Implementation of the FreeBSD Operating System"
The FreeBSD kernel is never preempted to run another user process while executing in the top half of the kernel although it will explicitly give up the processor if it must wait for an event or for a shared resource.

You might have better luck asking these types of questions on the mailing lists.
 
Yes, this is a pre-emptive kernel, not a co-operative one.

If you are interested in learning more, I would highly recommend reading "The Design and Implementation of the FreeBSD Operating System"

Oh, my bad, I was thinking user space.
 
No. The FreeBSD kernel is never preempted to run another user process while executing in the top half of the kernel although it will explicitly give up the processor if it must wait for an event or for a shared resource.

You might have better luck asking these types of questions on the mailing lists.

I have noticed that NetBSD has added preemption and real-time scheduling extensions since version 5 (back in 2009). Does this mean that NetBSD is a better choice for embedded systems (specifically for real-time applications)?
 
I didn't mean to imply I was an expert on this. I only recall reading that paragraph from "The Design and Implementation of the FreeBSD Operating System", looked it up, but was called away before I could cite my source which I will now do. Sorry.

Now, that's a user process and I don't know anything about embedded FreeBSD. Some years back, I could give an expert answer but no more.
 
Run grep -R -i -I preemption /usr/src/sys, I get 144 lines including
Code:
/usr/src/sys/arm64/conf/GENERIC:options         PREEMPTION              # Enable kernel thread preemption
 
Back
Top