I am experimenting with SCHED_FIFO
and I see some unexpected behavior. The server I use has 12 cores with hyperthread disabled. All configurable interrupts have been configured to operate on CPU 0.
My program launches a thread for tasks with a lower priority, using the pthreads library, without changing the scheduling policy bound to the processor installed on kernel 0. The parent thread then sets the affinity for processor 3 and its own scheduling policy to SCHED_FIFO
using sched_setscheduler()
with pid zero and priority 1, and then starts a non-blocking cycle.
The program itself works well. However, if I try to enter the server a second time while the program is running, the terminal does not respond until I stop my program. It looks like the scheduler is trying to start other processes in the same kernel as in real time.
- What am I missing?
- Will the scheduler still try to run other processes in the real-time kernel? If so, is there a way to prevent this?
- Will there be a scheduling policy setting with
sched_setscheduler()
in the parent behavior change of the child that was created before?
Thanks in advance.
source share