On 7 Oct 2011 16:58, "Parmenides" <mobile.parmeni...@gmail.com> wrote: > > 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? New task pick by scheduler may try to get the same lock resulting in deadlock > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies