开发者

Process Priority vs Thread Priority

开发者 https://www.devze.com 2023-02-10 01:28 出处:网络
In Linux, a process is a set of threads. Each thread has its own priority! But does a process have a pri开发者_Go百科ority too? If so, how is it different from the thread priority? And when a new proc

In Linux, a process is a set of threads. Each thread has its own priority! But does a process have a pri开发者_Go百科ority too? If so, how is it different from the thread priority? And when a new process is created, how are these values propagated?


Linux implements (kernel level) Threads essentially as Processes. So you fall back to the good old process-priorities there.

See NPTL and nice (for understanding that processes are the first ones to have priorities). Mostly defaults are applied - in case of threads, the thread is a copy, so its priorities should be copied too. Will certainly vary with varying schedulers.

0

精彩评论

暂无评论...
验证码 换一张
取 消