When is to preempt safe?

Parmenides mobile.parmenides at gmail.com
Fri Oct 7 07:27:12 EDT 2011


Hi,

   Preemption has two cases: user preemption and kernel preemption. I
have tow questions about them.

1. According to Love, "If the kernel is returning to user-space, it
knows it is in a safe quiescent state. In other words, if it is safe
to continue executing the current task, it is also safe to pick a new
task to execute." What's the meaning of user preemption's safety? How
can we deduce safety of schedule from the current task going on?

2. Another statement from Love is that "the kernel can preempt a task
running in the kernel so long as it does not hold a lock". Why is it
not safe while kernel code holding lock?



More information about the Kernelnewbies mailing list