29

I was looking at the stats for the Intel Pentium e5700 CPU.

It has two cores and two threads. What do the threads do for the processor? Is there any relation between the number of cores and the number of threads? What purpose do threads serve for the system overall?

3
  • It's either the number of threads the CPU can handle at a time or some fake stat that Intel invented.
    – digitxp
    Aug 30, 2011 at 15:28
  • 3
    Voted to close as IMO this is too general - while I'm always very hesitant to say "just Google it", the purpose of Super User (and similar sites) is to answer real questions, not to be a dictionary for technical terms which are easily looked up in more appropriate resources.
    – Shinrai
    Aug 30, 2011 at 15:28
  • 3
    @Shinrai I have edited this to make it less general Aug 30, 2011 at 15:32

3 Answers 3

24

The core count is the physical number of cores on the CPU die itself, whereas the thread count is the number of individual application threads which can be executing simultaneously on the CPU itself. Without any additional or special hardware, this is equal to the core count. Some processers, however, will have more threads than they have cores.

Some Intel CPUs have a feature called hyperthreading, which allows an operating system to see double the amount of logical cores per physical core. This allows the operating system to schedule and run double the amount of threads simultaneously, so in the case of the CPU I linked to above, there are four physical cores, but eight logical ones (so you can run eight threads simultaneously).

Each individual application running in the operating system is either single-threaded or multi-threaded (think of each thread as a "sub-application"). Single-threaded applications require just one thread to run on the CPU, whereas multi-threaded applications have many sub-threads running simultaneously. Additional cores, or hyper-threading, allow more application threads to simultaneously run at once.

This allows multi-threaded (not single-threaded) applications to run much faster, since more than one thread can run at once on the CPU.


Just a final note, hyperthreading improves the performance of some multithreaded applications specifically optimized for it (since there is still only half the number of physical cores as there are logical). In some various cases, applications may run faster with hyperthreading disabled (although many applications do benefit from it). Regardless of hyperthreading, an increase in the number of physical cores will always benefit multithreaded applications.

7
  • 1
    Could you perhaps explain what threads do for the processor? +1 for mentioning hyperthreading though, as its very common now (Seems to be in all the i3's) Aug 30, 2011 at 15:35
  • Each process has at least one thread. When the process gets its turn on the CPU, the main thread runs until its CPU turn is up. A process can spawn another thread, and now two parts of that same process will be running and asking for CPU turns. All processes are programs, and with this mechanism, two things in that same program can be running at once. It's faster than making a new process (i.e. forking or loading a new program) but less secure. Processes are isolated from each other, threads of a process are not.
    – LawrenceC
    Jan 6, 2014 at 4:55
  • 1
    What if I have created a multithreaded java program with 50 concurrent threads executing, and I am running it on the Intel i7-4790K, which has 4 cores and 8 threads. Does this mean that only 8 of those 50 threads in the java application are actually executing concurrently and the rest are in a queue? How does that work
    – Donato
    May 4, 2015 at 20:09
  • @Donato the operating system interrupts any running threads to allow the others some time to complete their work. At any given moment only 8 threads are running on the CPU, and each core is constantly switching between different threads; it's helpful to think of them as "jobs" (keeping in mind jobs can also be assigned a priority). Each core will do some work for a given thread, and then is interrupted by the operating system's task scheduler to move onto a different job, do some work on that job, and so on and so fourth, until the job is completed. May 5, 2015 at 4:35
  • @Breakthrough, Re "so you can run eight threads simultaneously", What are the limitations of such simultaneity when compared to true simultaneity offered by individual real cores? Also, how is it possible that "applications may run faster with hyperthreading disabled"?
    – Pacerier
    May 12, 2016 at 10:33
9

A "core" represents an actual physical subset of a processor that can by itself handle processing, whereas a "thread" is how many actual processes the processor can handle at once. Intel has developed a technology they label "hyper-threading" this technique allows for one physical core (which would normally only be able to handle one thread at a time) to now be able to handle two threads simultaneously.

A thread is a task that the processor must handle, for a simple explanation, you can assume that every application you open (such as paint, notepad, media player) has its own thread... now this does not mean you can only open 2 applications at once, simply because the processor and OS work so fast at 'switching threads' to handle the needs of every application that you have open. You will just experience better performance with more cores because now you can dish out all of the work to more core processors.

For example, my work computer has an i7 in it. The i7 has 4 physical cores, but each core can do 'hyper-threading' which allows this processor to handle 8 threads at once. So if I open up the task manager, I will see 8 boxes for processor performance scale.

A general rule of thumb is that more physical cores are better than more threads. So if you were comparing a processors that had 4 cores and 4 threads, would be better than 2 cores 4 threads. But the more threads your processor can handle, the better it will perform while multitasking and for some very intensive applications (video editing, CAD, CAM, Compression, Encryption, etc) will in itself utilize more than one core at a time.

2
-1

clicking on links in an article in IE or chrome,, each time you click you make a thread. the more you click on links the more threads. have a 4 core CPU you have up to 8 threads you can open 8 links before you start having a problem. disregarding your internet connection. so each core is covering two of those links (threads) you have open. that's the idea IMO. if this makes any sense to anyone.

1
  • 1
    No, this is not what threads are in the context of CPUs or the question that was asked. Jul 18, 2019 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .