Multi-core processing

mitchell13

Honorable
Mar 18, 2012
6
0
10,510
if i have a quad core processor, how many threads can run on one core? is it different in every quad core or the same?
 

braincruser

Distinguished
Aug 26, 2011
81
0
18,640


Depends on the processor but you can usually run 1 thread per core, unless its Hyperthreaded in which case you can run 2 of them.

 
^^ Two per core in that case, actually.

It really does depend though; some SPARC architectures allow 8 threads per core. Any SMT implementation will typically allow more then one thread to be run at a time per core.

And lets not forget the fact that almost all CPU architectures will do their best to keep the pipeline full at all times, so multiple threads will be running within multiple parts of the CPU pipeline.
 

senshu

Distinguished
Aug 19, 2010
52
0
18,630


I would sincerely hope that someone running a SPARC server wouldn't have to come to Tom's and ask how many threads per core their quad core processor could handle. Never know, though! :)
 

mitchell13

Honorable
Mar 18, 2012
6
0
10,510
SO BASICALLY YOUR SAYING 8 BITS PER CORE, MAKING IT A FULL BYTE? THANK YOU FOR THE ANSWER I REALLY APPRECIATE IT. I AM IN NETWORKING SCHOOL AND I JUST STARTED ABOUT A MONTH AGO AND I MAY ASK QUESTIONS THAT SEEM DUMB BUT FOR ME THEY ARE NOT, SO THANK YOU FOR TAKING THE TIME TO RESPOND AND NOT BEING SARCASTIC LIKE SOME PEOPLE.
 

mitchell13

Honorable
Mar 18, 2012
6
0
10,510
IF YOUR ANSWERING RUDELY TO MY QUESTION OF HOW MANY THREADS CAN BE RUN PER CORE ON A QUAD CORE THEN I DONT NEED YOUR SARCASM. I AM IN COMPUTER NETWORKING CLASS AND I MAY ASK QUESTIONS THAT SEEM DUMB TO YOU BUT DONT FORGET YOU STARTED OUT SOMEWHERE TO. THANK YOU AND HAVE A NICE DAY.
 



Hi :)

A little politeness goes a long way here at TOMS ....

All capitals is considered shouting and very impolite....

You may well want to come back here for more advice from the various experts.....

This is a hint by the way.....

All the best Brett :)
 

ebalong

Distinguished
Sep 11, 2011
422
0
18,790
OP was responding to the snarky response(s) to his original question, he did not initiate the rudeness. Asking how many threads/core may seem a trivial matter to some, but it is an honest question.
 



Hi :)

I stand by what I said...

Maybe he did not initiate the rudeness....but he certainly responded rudely....

Politeness costs nothing, but I suspect he is too young to have learnt that yet, unfortunately :(

All the best Brett :)
 

braincruser

Distinguished
Aug 26, 2011
81
0
18,640
Now that you explained your question:
A core usually can do 1 thread at a time, intel hyperthreaded cores can do 2 at a time
"8 BITS PER CORE" threads dont work that way.
2 threads running on one core goes like this:
5000 cycles for thread one, one waits for data, core switches to thread 2, core runs thread 2, data for thread 1 arrived, core finishes thread 2 and waits for data, core switches to thread 1, core runs thread 1... and so on and so on.

So a non hyperthreaded quad cpu can run 4 threads in a single moment. Hyperthreaded quad core can run 8 threads.

some processors especially ones with low overhead for switching between threads can do thousands of threads on less than a hundred cores, usually this is utilized in GPU's or other paralel processors that are made for mathematical calculations.
 

braincruser

Distinguished
Aug 26, 2011
81
0
18,640
"8 BITS PER CORE" threads dont work that way.
2 threads running on one core goes more like this:
50 cycles for thread one, one waits for data, core switches to thread 2, core runs thread 2, data for thread 1 arrived, core finishes thread 2 and waits for data, core switches to thread 1, core runs thread 1... and so on and so on.
Sometimes it goes diferently, say: thread 1 uses integer calculations, thread 2 needs to do floating point calculations on a Vector, core runs both at the same time, thread 1 getting the integer pipeline, thread 2 goes to the floating point unit or the SIMD pipeline (sometimes both of them are the same)

P.S. i cant edit my previous post so insert this in the right spot