Skip to contentSkip to conversation

Problem with SCHED_RR and kernel 2.4.18-4GB

DISCUSSION g-j v dijk 1 participant 1 message Dec 30, 2003

lore
Share & tools
lore

g-j v dijk

author
#0 lore raw
Quoted 9 lines
Quoted 1 line

The problem is that if I implement this, and set scheduling to be

SCHED_RR,

Quoted 1 line

or SCHED_FIFO, my linux machine hangs. With SCHED_OTHER, I don't have

that

Quoted 1 line

(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.

Yep, I checked all threads. Not all threads have sleeps, but they do use semaphores or some blocking OS calls. Are you saying that's not enough? I think it should be, else the threads have design flaws.

Quoted 1 line

[BTW you are not running the same code in both cases due to ifdefs...]

Yep, IMHO you don't have to set the schedule type in "OTHER" mode.

Quoted 3 lines

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 like that Idea, it would be really appreciated if you could give me some sample code, just to get me started.

Thanks a lot,

Gert-Jan

_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl