Ubuntu System monitor shows 4 cpu while I have 2 cores

Acording to my laptop website and intel website, my CPU is Intel i5-2410M

Processor Number i5-2410M Cores 2 Threads 4 Clock Speed 2.3 GHz Max Turbo Frequency 2.9 GHz

so I have two cores, but why does ubuntu 12.04 show 4 cpus for my cpu ? Ubuntu 12.04 System Monitor result for my intel i5-2410M


Solution 1:

It is because of hyper-threading, where each core can (put simply) execute two threads simultaneously Which is why you see 4 threads, 4 threads == 4 'cpus'.

Quoted from wikipedia:

Hyper-threading works by duplicating certain sections of the processor—those that store the architectural state—but not duplicating the main execution resources. This allows a hyper-threading processor to appear as two "logical" processors to the host operating system, allowing the operating system to schedule two threads or processes simultaneously.

Solution 2:

As l300lbl stated it must be because of hyper-threading. More information can be found on wiki.

What it basically do is to let you use one physical core as two logical ones. For example if you have a quad-core processor with hyper-threading technology it will let you to have 8 logical cores from 4 physical cores.

Intel did a nice job using this technology by allowing you to have double the threads that you would have without hyper-threading.

Also, seems that only Intel chips seems to use such technology, other chip manufactures focus on creating more physical cores instead of hyper-threading. My guess is that physical cores > logical cores :)