Re:Grand Central Dispatch Now Open to All
by wmf on Friday September 11, 2009 @02:08PM
(#817784)
I've found very little documentation on this, but apparently the kernel optimizes multiple thread pools to prevent excessive context switches. (Consider an N-core system where multiple processes each create N worker threads of their own.)
[ Parent
| on HN ]
Re:Grand Central Dispatch Now Open to All
by scott_s on Friday September 11, 2009 @04:25PM
(#818058)
Do you mean process migration (rescheduling a process/thread on a different core, which does bad things to caches) instead of context switching (switching between different processes/threads on the same core, which requires saving registers to memory and does bad things to caches)? If so, any decent modern scheduler tries to avoid migrating threads.