SCHED_FIFO process with priority of 99 gets preempted?

后端 未结 1 1825
走了就别回头了
走了就别回头了 2020-12-30 11:44

this is from sched_setscheduler(2) - Linux man page:

\"Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR) have a sched_priority value in

相关标签:
1条回答
  • 2020-12-30 12:17

    If you haven't changed any other policy settings, then you're likely getting throttled. See this informative article on the real-time limits added to the scheduler a few years back.

    The gist of it is: Unprivileged users can use SCHED_FIFO and try to soak the CPU, but the RT limits code will force a little bit of SCHED_OTHER in anyway so you don't wedge the system. From the article:

    Kernels shipped since 2.6.25 have set the rt_bandwidth value for the default group to be 0.95 out of every 1.0 seconds. In other words, the group scheduler is configured, by default, to reserve 5% of the CPU for non-SCHED_FIFO tasks.

    0 讨论(0)
提交回复
热议问题