Saturday, February 26, 2022

[SOLVED] Preemptible kernel can be preemptible during disable interrupts?

Issue

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


id='dv4'>

Solution

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.



Answered By - Kaz
Answer Checked By - Candace Johnson (WPSolving Volunteer)