Can someone explain how the Windows scheduler executes its code. Does it work from a dedicated CPU or does it share with all other kernel mode/user mode processes ? I have read somewhere that modern day processors offer architectural extensions providing for several banks of registers that can be swapped in hardware see this post.
Asked
Active
Viewed 66 times
1 Answers
0
They share. A typical system spends so little of its time running kernel code that dedicating an entire core to it would be an absurd waste, and the scheduler itself is a tiny fraction even of that. And in cases where it does need to run a lot of kernel code, that's exactly when you want that work shared among as many cores as possible.
I'm not sure about Windows specifically, but a common OS design is that every core executes the scheduler when it's time to decide which task that core should execute next.

Nate Eldredge
- 48,811
- 6
- 54
- 82