Oct. 8, 2011
4:19 p.m.
2011/10/8 Chetan Nanda <chetannanda@gmail.com>:
New task pick by scheduler may try to get the same lock resulting in deadlock
It seems that this kind of deadlock may be removed eventually. Suppose that we have a task A, which is holding a spinlock. If A is preempted by task B which try to obtain the same spinlock. Although B has to busy wait, it will end up with be preempted owing to using up its timeslice. Therefore, A has chance to be selected by shechedler and release the spinlock. Then, B will go on when it is selected by the secheduler next time.