[英]How does linux process scheduling policy relate to thread scheduling policy?
I'm a bit confused between thread vs process scheduling. 我在线程与进程调度之间有点混淆。
I've read about process scheduling policies at 我已经阅读了有关流程调度策略的内容
http://man7.org/linux/man-pages/man2/sched_getscheduler.2.html http://man7.org/linux/man-pages/man2/sched_getscheduler.2.html
and I've read about thread scheduling at 我读过有关线程调度的内容
http://man7.org/linux/man-pages/man3/pthread_getschedparam.3.html http://man7.org/linux/man-pages/man3/pthread_getschedparam.3.html
Do threads inherit scheduling policy from their process? 线程是否从其进程继承调度策略? Is it possible to set process scheduling to
SCHED_OTHER
, and then set one of that process's threads to SCHED_FIFO
? 是否可以将进程调度设置为
SCHED_OTHER
,然后将该进程的一个线程设置为SCHED_FIFO
? I understand the policies independently but don't understand the thread/process relationship. 我独立理解策略但不了解线程/进程关系。 Nay insight?
有没有洞察力?
Linux does not support process scheduling at all. Linux根本不支持进程调度。 Scheduling is entirely on a thread basis.
调度完全基于线程。 The
sched_*
functions incorrectly modify the thread scheduling parameters of the target thread id instead of the scheduling parameters of a process. sched_*
函数错误地修改了目标线程id的线程调度参数,而不是进程的调度参数。 See: 看到:
http://sourceware.org/bugzilla/show_bug.cgi?id=14829 and http://sourceware.org/bugzilla/show_bug.cgi?id=15088 http://sourceware.org/bugzilla/show_bug.cgi?id=14829和http://sourceware.org/bugzilla/show_bug.cgi?id=15088
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.