Re: Problem with SCHED_RR and kernel 2.4.18-4GB
From: Roger Larsson
Date: Mon Dec 29 2003 - 18:55:29 EST
> I'm a newbie at Linux, but have been busy developing (with some other
> people) sort of a DVB zapper demo application/stack on top of Hauppauge HW
> and SUSE 8.0 kernel 2.4.18-4GB for the last 2 months.
> As the stack wil eventually be ported to one (or more) dedicated HW
> platforms, we defined an OS independant API. Now, we want to be able to set
> priorities, and have sort of a realtime behaviour.
> The problem is that if I implement this, and set scheduling to be SCHED_RR,
> or SCHED_FIFO, my linux machine hangs. With SCHED_OTHER, I don't have that
> (note that for testing I used to set all prios to minimum (=1)).
The big difference is that if a tread running as SCHED_RR or SCHED_FIFO never
sleeps normal treads (like X, sh, login, ...) will not be given ANY CPU time
- computer will appear hanged.
[BTW you are not running the same code in both cases due to ifdefs...]
But it is possible to get out of this situation if you prepared for it
before... Use a higher priority monitor to detect looping RT processes and
reduce their priorities!
(I have code if you are interested, please CC me as I am not subscibed to
linux-kernel)
/RogerL
--
Roger Larsson
Skellefteå
Sweden
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/