PDA

View Full Version : Why Does Activity Monitor Show 4 CPUs?




jason.siegel
Jul 22, 2011, 10:44 PM
Why does Activity Monitor (and iStat) show four CPU cores? Isn't the new Air dual-core?



bloijs
Jul 22, 2011, 10:47 PM
Hyper-threading. Each core can run two threads at once.

Intell
Jul 22, 2011, 10:47 PM
They are dual core. But each core has two virtual cores.

jason.siegel
Jul 22, 2011, 10:47 PM
I'm not familiar with the vocabulary, apparently. Is that similar to how one CPU can double its workload with two cores? So now each core can double its workload with two threads?

wordoflife
Jul 22, 2011, 10:50 PM
I'm not familiar with the vocabulary, apparently. Is that similar to how one CPU can double its workload with two cores? So now each core can double its workload with two threads?

Each core has two virtual threads.

The computer thinks that you actually have four cores (2 cores X 2 threads for each processor), so that's how it sends the data. But in reality, it's really being processed by two individual cores.

jason.siegel
Jul 22, 2011, 10:51 PM
Interesting. What's the advantage of hyper threading?

Thanks.

clyde2801
Jul 22, 2011, 10:54 PM
Interesting. What's the advantage of hyper threading?

Thanks.

Okay, let's try this analogy old school. It's like having a four barrel carburetor. You can chug around for most of the day on two and be fine, but if a program needs maximum performance across multiple cores, the cpu can open all four up. They're there if you need them, and sit there quietly if you don't.

wordoflife
Jul 22, 2011, 10:54 PM
Interesting. What's the advantage of hyper threading?

Thanks.

It only helps to a certain degree depending on how the application is coded. Basically it has improved support for multi-threaded code, allowing multiple threads to run simultaneously, improved reaction and response time. (via Wikipedia).

It's not really a big performance difference, but that explains why it is showing 4 cores.

This video will help you picture how this is set up: http://www.youtube.com/watch?v=kkrqyEpINSQ
In the video, the processor is a quadcore processor with hyperthreading (so it shows 8 threads) but you'll get the point on what is going on.

jason.siegel
Jul 22, 2011, 10:55 PM
Thanks, guys.

sammich
Jul 22, 2011, 11:04 PM
Each core can only do a single task at any given time, and usually the task doesn't use all the power of the processor when that task is occupying it. There's also a small 'lag' as the processor changes tasks. With those two things in mind, having 2 virtual cores per physical core means that the core (man, I hate repeating the same word so many times) won't be sitting idle as much since two tasks can be running at once. And finally, those two tasks can be done without changing tasks back and forward all the time.

waloshin
Jul 22, 2011, 11:47 PM
Each cpu has one virtual thread per core not two.

If each cpu had two virtual threads per cpu you would see 6 cpu's and not 4.

HiRez
Jul 23, 2011, 01:11 AM
Ah, so that's why MenuMeters is showing me 4 CPU graphs.

sammich
Jul 23, 2011, 02:08 AM
Each cpu has one virtual thread per core not two.

If each cpu had two virtual threads per cpu you would see 6 cpu's and not 4.

Same thing, different way of looking at it. At least, the way I see it, the actual core is masked by the two logical/virtual cores.

hachre
Jul 23, 2011, 02:12 AM
delete me