Re: SCHED_FIFO counters are never reset in 2.0.xx

Stephen C. Tweedie (
Wed, 29 Jul 1998 14:20:36 +0100


On Tue, 21 Jul 98 13:03:38 METDST, Alessandro Muzzetta
<> said:

> It seems that the counter for a SCHED_FIFO process is never
> reset. After the first time-slice, schedule() will be called
> on every clock tick.

> Can anyone confirm this? Is SCHED_FIFO supposed to work this
> way?

Whenever there are no runnable processes with non-zero counter, we share
out a bit more counter to _all_ processes using the assignment

p->counter = (p->counter >> 1) + p->priority;

Now, a SCHED_FIFO process had better not be compute bound, else our
system is in a permanent tight realtime loop! As long as the
recrediting gets run occassionally, and the SCHED_FIFO never spins in a
tight loop for too long, we won't get this problem. If SCHED_FIFO
_does_ spin for longer than p->counter, then yes, we'll be rescheduling
every clock tick.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at