Sign in with
Sign up | Sign in
Your question

What is core and thread?

Tags:
  • CPUs
  • Core
  • Processors
Last response: in CPUs
Share
June 1, 2011 3:23:19 PM

Hello, good evening. :) 

Can someone explain to me about the "core" and "thread" in the processor. What's the difference between core and thread?

Thanks and God bless.

More about : core thread

a c 217 à CPUs
June 1, 2011 3:33:33 PM

A thread is a single line of commands that are getting processed, each application has at least one thread, most have multiples. A core is the physical hardware that works on the thread. In general a processor can only work on one thread per core, CPUs with hyper threading can work on up to two threads per core.

For processors with hyper threading, there are extra registers and execution units in the core so it can store the state of two threads and work on them both, normally to change threads you have to empty the registers into the cache, write that back to the main memory, then load up the cache with the new values and load up the registers, context switches hurt performance significantly.
m
0
l
June 1, 2011 3:52:01 PM

Hello hunter, good evening. :) 

So you mean, THREAD is a program and the CORE is a hardware? Am I right?

Take care and God bless. :) 
m
0
l
Related resources
a b à CPUs
June 1, 2011 4:05:14 PM

Core = hardware. Correct.

Thread = how the hardware is supplied with information. Think of it as the 'road' by which the information gets into the CPU core.

Some processors, like the i7-2600K, have hyper-threading. This is where each core can take 2 threads. In layman's terms, although the CPU has 4 physical cores, it allows the CPU to act as if it had 8 cores. Generally only useful for high-intensity programmes that do modelling or video-editing work.
m
0
l
a b à CPUs
June 1, 2011 4:06:04 PM

shengton said:
Hello hunter, good evening. :) 

So you mean, THREAD is a program and the CORE is a hardware? Am I right?

Take care and God bless. :) 


A core is the hardware part , a single physical unit of the processor that can work on thread(s).

When software is executed, depending on how it was written/complied, it may contain 1 or more threads.


The core2 , phenom's,athlon's, pentium3 and older processors etc can handle only 1 thread/core

Some pentium 4's, and all 1st and 2nd generation 'core i' support hyper-threading, ie 2 threads/core , giving a slight boost in performance for almost free.
so, a core i3 for instance, has only 2 cores, but can handle 2x2=4 threads , and hence appears as a quad core to the OS.(4 logical cores)
m
0
l
a c 217 à CPUs
June 1, 2011 4:07:27 PM

The core is the hardware the thread is the software, the thread count for a CPU is how many threads it can handle at once.
m
0
l
a b à CPUs
June 1, 2011 5:14:54 PM

Quote:
not true, the i5-2500 etc. dont have 2 threads per core. and many of the core 2 series have hyper-threading too. and they dont give a 'slight' boost, in some applications having 2 threads to one core can quite dramatically improve performance.


sorry my bad, forgot bout the quad i5's, yea they 4c/4t, and i never mentioned core2 having HT btw :-)...
and yea...as for HT boosting performance,the dramatic stuff is mostly only in synthetic benchies, and in *SOME* day to day apllications:-)
m
0
l
a b à CPUs
June 1, 2011 6:40:39 PM

hi
cores are physical cores, threads are virtual cores, cores with 2 threads is called hyper threading technology, 2 threads/core makes the core work on two loads at same time. dual cores with 4 threads(hyper threading) is of course faster than dual cores w 2 threads only (no hyper threading). but this dual cores with 4 threads is still not as fast as 4cores with 4threads, because core has its own memory, so if you have a dual core with hyper threading, the core works with 2 loads each at same time because of the 2 threads per core, but this 2 threads will share memory in that core, unlike the 4 cores with 4 threads, they dont share memory because they have their own dedicated memory 1 core 1 thread, so the processing time is still faster than the 4cores with 4 threads, than the dual cores with 4 threads.
m
0
l
a b à CPUs
June 2, 2011 7:37:33 PM

I'll try and dumb it down a bit:

CPU: The "brains" of the computer. Responsable for all computations, loading of data, etc

Core: An individual CPU unit. For instance, a Dual Core CPU can be thought of as having two seperate CPU's in a single package, with their own dedicated registers and cache. [This isn't entirely correct, but its a simlified explanation]

Process: A process can be thought of as a program. When you start a program, it kicks of its process, and all memory that is allocated is allocated at the process level.

Thread: A thread is a unit of execution within a process. One process can have many threads. For instance, you could have a thread to handle User Input, a thread for program control, a few threads for AI managment, a thread for audio, etc. All these threads exist within a single process.

Within most modern OS's, the thread is the smallest unit of execution; the OS schedules threads [usually based on priority], and the CPU spends some time operating on a thread, before swapping in a new one to work on [giving the illusion multiple things can happen at the same time].

On a multiple-CPU or multi-core system, multiple threads could be run at the same time, hence why there is an increasing focus on software parallelization.
m
0
l
a c 190 à CPUs
June 2, 2011 8:25:47 PM

Great explanations, it all comes down to Core is the brains of a computer or CPU. Each core can do one thing at a time. Threads are the number of programs/applications that you have running at once or the way that a program has been written in which it will break itself apart and send part to one core and part to another by doing this it increase the performance of a processor/CPU in most cases giving you 15% to 85% performance boost for each additional core or thread that the processor can run and that the application is designed to be broken into. Right now a good number of games can take advantage of up to 3 threads.
Hyper-threading is a technology that allows a second thread of information to enter the processor and take advantage of core resources that are not being used. While this won’t give you the full performance of an extra core it does give you a performance increase.

Christian Wood
Intel Enthusiast Team
m
0
l
June 4, 2011 6:13:18 AM

Intel and AMD CPU chips have multiple cores and each core is an processor so they effectively are multi-procesor chips.

Most programs, such as excel, consist of a single process which has 1 address space and runs on 1 processor. Threads allow one process to use multiple processors (cores) to work on a single problem in order solve that problem faster.
m
0
l
April 14, 2013 5:57:58 AM

think of an assembly factory(cpu)
with two processing robots(cores)
which working on items on belt(s)(thread)

at non-hyper threading, a processing robot can only serve a belt,
but hyper threading one can work on two belt.

note that the materials for processing are not always present at a belt.
and the robot can only process at a belt in one time
so, when there's none in one belt,
the robot moves to process material in another belt, and such

it does, speed up performance if there's a lot of processed stuff,
since the waves of materials to be processed are rather high,
and those loads of stuff can loaded in the belts

but if there barely any to process, it's just the same with the non hyper threading.

another example:
a route (cpu)
with two road (cores)
and trucks transporting stuff there(thread)


a hyper threading road have twice more trucks than non hyper threading one.
the trucks have the same speed

indeed, when both route given the maximum capacity of the hyper threading route, (used in video editing and stuff)
the hyper threading one is much faster.
but, there's congestion in the road, so that doesn't necessarily twice faster.

when both route given half of the capacity of non hyper threading route,
the speed is relatively same, cause the speed of the trucks are same

well something like that.
m
0
l
September 3, 2013 1:43:15 PM

I understand the concept of multi-core processors and something about hyperthreading within the cores. I also understand parallel processing very well. What I don't know is how fast the processor can simultaneously run processes...

Here's an example:
You have one quad-core processor with no hyper-threading.
The processor is 3000 MHz
So, let's say, for simplicity, that you have ONLY 4 threads running at one (with an OS like Windows, that'll never happen). Also, let's assume that these are completely independent threads that don't depend on the results of the other threads and are using different areas of memory.
My question: Are you, in effect, achieving what a 12 GHz, single thread, processor can do? (if you wrote a single-thread program that accomplishes what the four threads were doing without any overhead).

Secondly, about hyperthreading.... This time let's assume it's the same quad-core processor running at 3.0 GHz but it has hyperthreading to allow 2 threads on each. I read some of the responses about there being a separate set of registers, etc. So it sounds like hyperthreading only eliminates the overhead of task-switching. Am I right?
So, a quad-core with 2 threads per core is still, effectively, 12 Ghz (with 8 independent threads running) but faster than a quad core with no hyperthreading because there is little to no overhead in switching tasks? It's not equiv. to a single-thread 24 GHz processor, right?

Thanks a bunch!
Paul
m
0
l
October 21, 2013 4:20:51 AM

ChristmasPaul said:
I understand the concept of multi-core processors and something about hyperthreading within the cores. I also understand parallel processing very well. What I don't know is how fast the processor can simultaneously run processes...

Here's an example:
You have one quad-core processor with no hyper-threading.
The processor is 3000 MHz
So, let's say, for simplicity, that you have ONLY 4 threads running at one (with an OS like Windows, that'll never happen). Also, let's assume that these are completely independent threads that don't depend on the results of the other threads and are using different areas of memory.
My question: Are you, in effect, achieving what a 12 GHz, single thread, processor can do? (if you wrote a single-thread program that accomplishes what the four threads were doing without any overhead).

Secondly, about hyperthreading.... This time let's assume it's the same quad-core processor running at 3.0 GHz but it has hyperthreading to allow 2 threads on each. I read some of the responses about there being a separate set of registers, etc. So it sounds like hyperthreading only eliminates the overhead of task-switching. Am I right?
So, a quad-core with 2 threads per core is still, effectively, 12 Ghz (with 8 independent threads running) but faster than a quad core with no hyperthreading because there is little to no overhead in switching tasks? It's not equiv. to a single-thread 24 GHz processor, right?

Thanks a bunch!
Paul


Not totally sure, but perhaps my experience will shed a little light on it. I run SETI@HOME on several machine. One is a Pentium-D dual core 3.40Ghz HP, and the other is a rather old Foxconn Pentium 4 Prescott (single core), also at 3.4 Ghz. Seti see both as having 2 CPUs, and where the HP handles two simultaneous jobs at about 1750 MFlops, the Foxconn handles 2 jobs at about 1480 MFlops. The other P4s I run will only process a single job at a time. I guess the multi-thread is considered as equivalent to another CPU for application purposes. I was certainly surprised to see Seti reporting 2 CPUs on the Foxconn, which led me to this message thread. I still don't know quite what to make of it all, but I certainly can't argue with the results.
m
0
l
February 23, 2014 4:52:44 PM

Dear all,

It's a very useful discussion on core and thread.

I write a post How Multi-Core Processors Accelerate your LAMP Applications to explain how modern multi-core processor with hyper-thread technology to serve your LAMP application with different Apache MPM in different scenario.

With HT, the processor may serve more threads than the number of its core(s). It is called "logical" core. And using tools like htop, top, or task manager will take "logical" cores as cores in the graph.

Even with multiple cores, you need the right program, configuration, and scenario to see the different. For thread-safe programs with Apache Worker MPM, requests may be served with more than one thread. You will see performance improvements. But with preform MPM, a request is served with one thread. You probably won't see different or even worse degradation with HT.

Wish it helps!

Amigo
m
0
l
!