preemptive kernel

Konstantin Belousov kostikbel at gmail.com
Sun May 26 15:47:57 UTC 2013


On Sun, May 26, 2013 at 11:09:03AM +0000, Orit Moskovich wrote:
> Can a filter routine preempt another filter routine? And can an interrupt thread (or a filter routine) preempt another ithread?

Filter handler borrows the context from the thread executed at the
time of the interrupt.  At least on x86 (i.e. i386 and amd64) interrupt
handlers are executed with the interrupts disabled.  So the filter
cannot interrupt another filter.

Interrupt threads are executed with the interrupts enabled. So if an
interrupt is delivered to the CPU while the CPU executed the ithread,
the filter 'preempts' the ithread by executing in its context.  For
the same reason, if the interrupt delivered causes a higher-priority
thread become ready to run, then the new runnable thread could preempt
the interrupt thread according to the priority, affinity and other
factors considered by a scheduler.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20130526/5d8a5deb/attachment.sig>


More information about the freebsd-hackers mailing list