I have tested the rt process's latency by cyclictest. And found that when I launch dozens of disturbing processes(SCHED_NORMAL
) the rt process's latency will get bigger. I can't explain this.
The test command is: ./cyclictest -p80 -n
The priority of the rt process is 80.
The disturbing process is simple:
while(1) {
srand(time(0));
while(j++ < rand()%1000000);
usleep(10);
}
In Linux kernel, the SCHED_FIFO
have high priority to be scheduled, no matter how many SCHED_NORMAL
processes are there, as long as the RT process is runnable, it will be executed immediately.
Can anyone explain why launching a dozens of normal processes can affect RT process's latency?