I have a CPU with four cores, but the specification shows it to have four cores and eight threads. How is that possible? Can I actually run eight threads in parallel?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This one can deceive you. Intel’s HT technology does indeed allow the operating system to schedule two threads for each physical core, due to a virtual duplication of the core’s resources.
“Technically” you are able to run eight threads. Notice the quotes. The main purpose of this technology was to not let the CPU resources get wasted (e.g. if your instruction pipeline has a width of four instructions, make sure it’s almost always getting instructions, since one thread can rarely achieve this).
However, if your system does not have enough resources to accommodate the computations done by your threads, you will not actually have any benefit, or worse, your performance will degrade. For example, say your CPU has only four floating-point units while all your eight threads are doing floating point calculations. In this case you cannot have parallelism. Another case is when all your threads are doing memory-intensive computations. The bus from CPU to main memory will be saturated and eight threads will definitely not be able to execute their code in parallel as you expect. For more about the pitfalls of HT check this article: http://software.intel.com/en-us/articles/performance-insights-to-intel-hyper-threading-technology/
Also, make sure you understand the various levels of threading in the system. I hate to reference myself but here goes: multithreading on dual core machine?