Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gkroeger

macrumors member
Original poster
Sep 15, 2007
30
0
How are cores allocated to threads and processes? Is this a hardware feature of the motherboard chipset, or does the OS control? For example, with an octo-core MacPro, would the second thread be assigned to the second CPU, or the second core of the first CPU? It would seem like balancing across CPU's would make best use of memory bus architecture?

The reason I wonder is whether a system that typically only uses 4 cores would run faster with a two processor system than with one quad-core chip.

Thanks
 
I'm sure folks will correct me fairly quickly if I'm wrong, but I'm pretty sure this is a feature of the OS (hence one of the big things was that 10.5 was "multi-core optimized" or whatever).

And in my experience, at least with 10.4, it doesn't just have one thread per core, but it will trade them off. Which honestly doesn't make sense to me (except for heat issues) because it takes time to shuffle it from one processor to another.
 
Yeah the OS handles it. I don't think anyone really knows other then apple exactly how it makes its decisions we can only guess. But 10.5 was a big improvement over 10.4 For example in 10.4 if you had one CPU intensive task it would "jump" from core to core staying on one for a couple seconds then moving on. This makes it have to move the L2 Cache between processors not the best plan. Now it stays on one core for the most part.
 
In OS X 10.5 there will almost always be multiple threads running on each core. X will seek to balance the load across all cores for best performance. Hopping between cores in the same processor incurs no penalty as the L2 is shared.
 
Hopping between cores in the same processor incurs no penalty as the L2 is shared.

Yes but 10.4 didn't care which processor had the L2 cache data. So it would jump one after another between all 4 of my cores, which are based on 2 CPUs so 2 L2 caches.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.