Can a Multithreaded application use multiple cores?

martelmungo

Honorable
Feb 8, 2013
9
0
10,510
my thing is this can a single thread application use one core,
while a 8 threaded application can use 8 cores of a processor, if available?
This guy im talking to is telling me i am wrong and from reading a lot on it over the years this is my understanding, so am i wrong?

And if that processor is rated a 4 GHz, and it has 8 cores, it means 4 GHz per core, and if an application is designed to utilize all 8 cores, it could theoretically have 32 ghz of processing power if it utilized all the processor cores 100%

However if the program is designed to only use one core, the maximum processing power that application can receive is 4 GHz because one core is 4 GHz and it can only use one core.

Am i right or wrong?
 
D

Deleted member 217926

Guest
The multi core part is correct. The 32Ghz part is incorrect. The processor speed is not additive like that. You have a 4Ghz processor. Each core runs at 4Ghz. If an application uses all 8 cores it uses 8 cores with each running at 4Ghz. Just like if it was using 1 core at 4Ghz it's still 4Ghz.

 


Yeah but he means the 4GHz x 8 as a theoretical "processing speed" number. Not correct by any means but a good way to explain to noobs.
 

martelmungo

Honorable
Feb 8, 2013
9
0
10,510


Would it be better to say the rate of raw data to processed data increases by close to or around 8 times, for a application that can and does utilize all 8 cores at maximum speed. Like if 4ghz can process 460mb of raw data per clock cycle, then 8 cores can process 460*8=3,680mb per clock cycle, not saying that is the correct amount of data able to be processed per clock cycle, per 4ghz, but that whatever the amount is per ghz or hz, however you want to do it, multiple cores increases the processed data output, when all cores are utilized effectively. The amount of data output, would per cycle when fully utilized effectively and efficiently, would be close to that of the work a 32ghz single core processor could output per clock cycle?

Its not that it really runs at 32ghz but it can process close to if not equal to the same amount of data per clock cycle
 
D

Deleted member 217926

Guest
Not really. A single 32GB processor would be able to utilize all of that speed on one thread. Since a multicore processor splits the load among active threads it can't at any time combine it's cores on one thread anymore than a single core processor can split it's processing power. A 4Ghz processor is just that. Just think of it like having 8 individual processors running at 4Ghz. I'm not sure if we are on the same page here or not lol.
 


LOL no we are not. He means that a MULTITHREADED app will theoretically be a able to use 32GHz, not a single threaded one.
 


Close to yes, but that close will end up being short by 20% loss because of efficiency. Considering that by splitting the data the CPU would need to do "work" to split and then reassimilate the data.
 
D

Deleted member 217926

Guest
No it will not. It's a 4Ghz processor. It's can't do a Voltron and combine to make a 32Ghz processor.

Would the data processed be the same? No. Although I would have to figure out the math. 8 x 4Ghz processors would not process the same amount of data as a single 32Ghz processor.
 

martelmungo

Honorable
Feb 8, 2013
9
0
10,510



well 32ghz is 32 billion clock cycles per second, if you have 8 cores, each at 4gh and you have a 8 thread program, or for argument sake, 8 programs each with their own affinity set to their own core. and each one maxes out the core at 4ghz, then each core. is producing 4billion clock cycles per second. each one is producing 4 billion clock cycle per second. the CPU as a whole as in amount of cycles done per second then its 32 billion cycles per second.

Or having 8 separate processors, each with their own program that maxes out 4ghz, then that pc is doing 32billion clock cycles per second

1 clock cycle is one on/off or one bit, 1 or 0 aka 1hz processes 1 bit
4billion hertz processes 4 billion bits per second. or in megabytes its about 500megabytes or 4gigabits per second.
Each program utilizes 100% of their own respective processor on the board, then the total output of data is 4Gib for cpu1;4Gib for cpu2; and so forth. The cpu has a whole or cpus as a whole are doing for 8 cpus at 4ghz. 32gigabits of processing, when maxed out..

same math... a processor rated at a theoretical 32ghz can process a theoretical 32Gib of data per second (4GB)
8 processors processing at 4Gib, per second is outputing 32Gib of data,

or look at it as 8 single core pc's maxing out at their 4ghz, each one then is theoretically outputting 4Gib, per second, so the output of the 8 machines is 32Gib/s

now we combine those pc's into one, and have all their processes run together, and combine their processors into one cpu and they are producing 32Gib of data, at each core at 4ghz

So... finding my answer... a 32ghz processor is super hard to even attempt to make/due to heat, and multiple processors in a server motherboard is expensive, and the fact of having processors in one cpu, means better bandwidth in between the processors, so we use multiple processors on one cpu, and get the same theoretical data processing, or 32 billion bits per second or 32 billion operations( of on and offs, aka 1's and 0's)

You can't argue with math
If the formula is correct, 1 bit per hz, then I'm right unless that formula changes for single core processors...

A hz is a hz, if a program can utilize multiple processing units, then it can utilize each hz. So unless we are claiming that a 8 core processor rated at 4ghz, means that each core can only do 500Mhz, and that the speed of 4ghz is the combined total; then you get 32 billion bits processed per second, 32 billion cycles per second, unless... what i said was true and that each core only does 500mhz.

Anyone a Computer engineer?
 


You are perfectly correct IN THEORY, but this is not a perfect world.

 

TRENDING THREADS