Hacker News new | ask | show | jobs
by otabdeveloper 3373 days ago
> Does the CPU interrupt threads running happily on cores even when there are no other threads which want to run or which have affinity that would allow them to run on that core?

Yes. Even if you are careful to ever run only one process (so: no monitoring, no logging, no VM's, no 'middleware', etc.) and limit the number of threads to strictly equal the number of processors, you still have background kernel threads that force your process to context switch.

1 comments

Tough you can instruct the kernel not to run anything (not even interrupt handlers) on specific cores, except for manually pinned processes.
At a minimum you still need timer and TLB IPI shootdown interrupts hitting every core, just to have a working SMP system.
the cpu does need to handle IPI of course but not sure about timers.