简体   繁体   English

如何从控制台获取线程调度策略

[英]how to get thread scheduling policy from console

Is this possible to figure out thread scheduling policy from linux console? 这可以从linux控制台中找出线程调度策略吗? I mean is it possible to receive something what pthread_getschedparam() returns but from console? 我的意思是有可能收到pthread_getschedparam()从控制台返回的内容吗?

I need to figure out whatever policy is SCHED_FIFO, SCHED_RR or SCHED_OTHER . 我需要弄清楚SCHED_FIFO, SCHED_RR or SCHED_OTHER任何政策。

The command ps -eLfc will give you a list of threads running along with their scheduling policy under the row titled CLS . 命令ps -eLfc将为您提供在标题为CLS的行下运行的线程列表及其调度策略。 RR (Round Robin), TS (Time Sharing) are some of the scheduling policies that may be present. RR(循环),TS(时间共享)是可能存在的一些调度策略。 If you want to start a process and mention a particular scheduling policy for its threads then you can use command chrt . 如果要启动进程并为其线程提及特定的调度策略,则可以使用命令chrt

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

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