lkml.org 
[lkml]   [2001]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.037 / U:2.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site