简体   繁体   English

使用sched_setscheduler

[英]Using sched_setscheduler

How can I use sched_setscheduler explained in this topic ? 如何使用本主题中介绍的sched_setscheduler It seems that I have to write a C code and run it on shell? 看来我必须编写C代码并在Shell上运行它?

To change the policy of a process from the shell you need to use chrt . 要从shell更改进程的策略,您需要使用chrt To choose real time priorities you must be root. 要选择实时优先级,您必须是root。 Beware that this is dangerous, raising priorities higher than the kernel interrupts will definitely have strange side effects! 请注意,这样做很危险,将优先级提高到高于内核中断的水平肯定会带来奇怪的副作用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM