9 ms·
> 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
by otabdeveloper 10y 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.
- gpderetta 10y agoTough you can instruct the kernel not to run anything (not even interrupt handlers) on specific cores, except for manually pinned processes.