Messages in this thread | | | Date | Thu, 08 Mar 2001 22:41:41 +1100 | From | Andrew Morton <> | Subject | Re: static scheduling - SCHED_IDLE? |
| |
Zdenek Kabelac wrote: > > > Since the linux kernel is not preemptive, the problem is a little > > bit more complicated; A low priority kernel thread won't lose the > > CPU while holding a lock except if it wants to. That simplifies the > > locking problem you mention but the idea of background low priority > > threads that run when the machine is really idle is also not this > > simple. > > You seem to have a sence for black humor right :) ? > As this is purely a complete nonsence > - you were talking about M$Win3.11 right ? > (are you really the employ of Sun ??)
awww.. Don't say that. Ludovic is a nice guy.
Look. Suppose you have a SCHED_IDLE task which does this, in the kernel:
down(&sem1); down(&sem2); /* This sleeps */
Now, a SCHED_OTHER task does this, in user space:
for ( ; ; ) ;
We're dead. The SCHED_IDLE task will never be scheduled, and hence will never release sem1. The solution to this problem is well known but, as Ludovic says, "not simple".
- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |