Varun
Varun

Reputation: 189

Linux Scheduler on NUMA and SMP

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.

Upvotes: 1

Views: 4309

Answers (1)

Praveen Felix
Praveen Felix

Reputation: 1428

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.

Upvotes: 2

Related Questions