what does 2 core 4 threads mean in cpu?

92,909

Solution 1

Your i5 has two cores, each core can run two threads because of intel's hyperthreading, making 4 threads, beyond that it switches at high speeds between processes. Here's a nice explation of multithreading if you want to know more, but in essence your CPU can run 4 processes simultaniously, and switch at high speed between processes.

Solution 2

I'm not sure about your level of expertise on Computer Architecture, however the Core i5 you've mentioned here implements a form of multi-threading known as Simultaneous multithreading (SMT). Intel's trademark for their implementation of SMT is hyperthreading.

Apart from SMT there are other forms of multi-threading, temporal multi-threading being one. For instance fine grained temporal multi-threading where the processor may switch between different threads every cycle and thus enable pseudo-parallel execution of several programs. Similarly there can be coarse grained temporal multi-threading where a processor may switch between threads when it hits a high latency operation such as a main memory access on the current thread. The exact switch points can vary based on implementation and requirements, such as fairness or real time deadlines.

SMT deviates from the context switch philosophy for multi-threading in that it actually has two or more threads executing on one processor at the same time. While the implementation can vary, the primary goal is to exploit the functional units in the processor which are idling if only one thread was executing, and also to exploit the wide issue superscalar nature of the processor. You can imagine temporal multi-threading as time slicing the processors resources, while SMT as spacial slicing of the resources.

A detailed analysis can be found in Tullsen's 1995 paper:

http://dl.acm.org/citation.cfm?id=224449

Share:
92,909

Related videos on Youtube

user734861
Author by

user734861

Updated on September 18, 2022

Comments

  • user734861
    user734861 over 1 year

    I wanted to know what does 2 cores 4 threads mean about a cpu? I am talking about this cpu which i have

    http://ark.intel.com/products/47341/Intel-Core-i5-520M-Processor-3M-Cache-2_40-GHz

    I initially thought i5 had 4 cores but i think i am wrong. My understanding of a thread is it is a chunk of code that can run simultaneously(concurrently) with other threads. So, what does 4 threads mean in that specs sheet? Is it different from the programmatic threads. Is the number of threads in there different from the program thread that we create. If it has just 2 cores then is it correct that you can only run 2 parallel programs even though it has 4 threads?

    • Ramhound
      Ramhound over 10 years
      Once you do some background research on en.wikipedia.org/wiki/Hyper-threading it should make better sense to you. The processor you have does indeed have the capability to do 4 instructions at a time. You should understand that even a single core CPU has the ability to run multiple programs. Its just does NOT have the ability to do 2 instructions at a time. You don't seem clear how on a program actually works.
    • Paul A. Clayton
      Paul A. Clayton over 9 years
      @Ramhound You presumably meant 4 instruction streams. Since the i5 is superscalar it can execute multiple instructions in parallel even from a single instruction stream. Simultaneous multithreading allows thread-level parallelism to be converted into instruction-level parallelism, increasing utilization of execution resources.
    • Ramhound
      Ramhound over 9 years
      I minimized my statement the number of instructions per clock cycle is the difference between a Pentium D and 4th Core i5 minus the size of the die, and the power requirements of course (again simplified)
    • Ciro Santilli Путлер Капут 六四事
      Ciro Santilli Путлер Капут 六四事 over 8 years
    • Jamie Hanrahan
      Jamie Hanrahan over 6 years
      This answer may provide edification: superuser.com/questions/1198459/…
  • Talespin_Kit
    Talespin_Kit over 7 years
    > "beyond that it switches at high speeds between processes." What makes the switching b/w process faster ?
  • Matt Sephton
    Matt Sephton over 6 years
    @Talespin_Kit I think @ Slowki was referring to the way a CPU is used to work on multiple processes, so it's not limited to 4 things. It's 4 threads of many things.