Home > Mobile >  Preemptible kernel can be preemptible during disable interrupts?
Preemptible kernel can be preemptible during disable interrupts?

Time:02-20

If i disable the interrupts, the kernel can be preemptible (for a single-core processor) ?

CodePudding user response:

Whether a kernel is preemptible is a general property of the code base. A preemptible kernel doesn't stop being preemptible just because interrupts were disabled to protect a critical region.

Obviously, it's not preemptible while that interrupt-disabled critical region is executing.

Non-preemptible kernels take interrupts (i.e. have them enabled most of the time) while executing kernel code; they just do not allow interrupt-driven switching to a different task while kernel code is executing.

  • Related