Linux Scheduler on NUMA and SMP

泄露秘密 提交于 2019-12-10 12:07:26

问题


I wanted to know if a copy of schedule() function runs on each processor, or is it just one schedule() running for each processor.

If there is a copy of schedule() running on each processor/core, how are the processes dispatched to a particular CPU/cpu runqueue. Is it the job of load balancer? Is there only one load balancer running for all CPU's or it is done in a distributed fashion using flags/communication method?

ps- I know the working of scheduling classes etc but I am having a hard time figuring out the distribution of processes among various runqueues.


回答1:


how are the processes dispatched to a particular CPU/cpu runqueue. Is it the job of load balancer?

Yes. In multi-processor system the load balancer periodically checks to see whether the CPU loads are unbalanced; if they are, the processor performs a cross-CPU balancing of tasks.

Is there only one load balancer running for all CPU's or it is done in a distributed fashion using flags/communication method?

Yes. In SMP scheduling there is only one schedule() and one load balancing that manage multitasking between multiple cores.

Refer: Inside the Linux scheduler.



来源:https://stackoverflow.com/questions/14811175/linux-scheduler-on-numa-and-smp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!