1

I am writing a server that I do not want preempted by any other user process or "low priority" kernel process. I'm using code like this:

struct sched_param sched_param;
memset(&sched_param, 0, sizeof(sched_param));
sched_param.sched_priority = SOME_PRIORITY;

if(-1 == sched_setscheduler(0, SCHED_FIFO, &sched_param)) {
  // ...

My problem is that when I set SOME_PRIORITY to be 99 (the max value), it appears that I starve out even the scheduler process, and my system quickly becomes unusable (the server process has a busywait loop at its core--I have no control over tihs aspect, it's a third party library).

So my question is, what value for SOME_PRIORITY can I use to only allow preemption by the scheduler (and possibly some small subset of kernel services)?

2
  • more related to unix.stackexchange.com ?
    – Web-E
    Jan 29, 2013 at 15:56
  • 1
    I think that such priorities differ by distribution.
    – laslowh
    Jan 29, 2013 at 15:58

0

You must log in to answer this question.

Browse other questions tagged .