16

I just got a new Apple MacBook Pro 13", mid-2012, which has a dual-core Intel i5 Ivy Bridge CPU. When I run Activity Monitor and turn on the Floating CPU Window, it shows a 4-bar graph (indicating 4 cores).

On my older MacBook Pro with an Intel Core 2 Duo dual-core processor, Activity Monitor only showed a 2-bar graph (indicating 2 cores).

Why does Activity Monitor seem to indicate that my Mac has 4 cores, when clearly it does not?

1

1 Answer 1

26

This is a technology called Hyperthreading those i5 chips support.

It means two threads can run simultaneously on each core resulting in two additional virtual cores. OS X's Activity Monitor only shows virtual cores, not physical cores. Likewise, a quad-core chip has eight virtual cores and that's what's presented in Activity Monitor.

To sum it up:

  • 1 CPU
  • 2 physical cores
  • 4 virtual cores (2 per physical core)
4
  • OK, but… If two threads can run at the same time, each thread can only run at maximum half the normal speed, no ? And I say maximum, Amdahl’s law comes in… Dec 1, 2013 at 20:43
  • 1
    Not so... executing an instruction involves multiple steps (read from memory, set registers, execute, store results, context switch, etc) hperthreading allows 2 threads to be running at different stages of the process simultaneously without losing speed.
    – Basic
    Feb 11, 2016 at 9:54
  • 2
    This behavior is due to Intel's SMP technology, which they term "Hyper-threading", as pointed out by @kremalicious. Also it is important to point out that Hyper-threading does not relate to pipelining (as suggested by @Basic), but superscalar. Here is a simple example to understand superscalar architecture: Instead of one arithmetic unit, we have, say, two copies of the same (one for each virtual core), so that the computations can be done in parallel on different data operands. Therefore, the virtual cores do not time-share the p
    – AmanNoug
    Jul 16, 2016 at 19:25
  • @AmanNoug You're quite right. My mistake.
    – Basic
    Jul 16, 2016 at 20:17

You must log in to answer this question.