Question Question about thread

AMT11

Commendable
Aug 11, 2021
16
0
1,510
Hello

Suppose we have a processor with two 3 GHz cores without turbo boost and each core has a thread. So each of the cores of this processor can process 3 billion cycles per second.

Now suppose we have a processor with two 3 GHz cores without turbo boost and each core has two threads.

Can we conclude that each core of this processor is 6 GHz and can process 6 billion cycles per second?

Also, does a cycle consist of fetch, decode and execute, or are each of them a separate cycle and requires 3 cycles (3 seconds) to perform?

Thank you
 

kanewolf

Titan
Moderator
Hello

Suppose we have a processor with two 3 GHz cores without turbo boost and each core has a thread. So each of the cores of this processor can process 3 billion cycles per second.

Now suppose we have a processor with two 3 GHz cores without turbo boost and each core has two threads.

Can we conclude that each core of this processor is 6 GHz and can process 6 billion cycles per second?

Also, does a cycle consist of fetch, decode and execute, or are each of them a separate cycle and requires 3 cycles (3 seconds) to perform?

Thank you
It is still 3GHz, two threads means that the CPU core can store instructions in cache for two tasks. It can swap between them quickly. But a CPU core only executes one instruction stream at a time.
 
  • Like
Reactions: AMT11

MasterWigu

Honorable
Aug 19, 2016
121
2
10,765
Now suppose we have a processor with two 3 GHz cores without turbo boost and each core has two threads.

As King_V said, it is not as simple as that, what we have today with technologies like hyperthreading and multithreading is cpu cores that can execute some instructions in paralel (it depends on the instructions and other details).

Can we conclude that each core of this processor is 6 GHz and can process 6 billion cycles per second?

Then no, the core is still running at 3GHz, with some instructions running in paralel, or close to paralel (due to different stages in pipelines and such.

Also, does a cycle consist of fetch, decode and execute, or are each of them a separate cycle and requires 3 cycles (3 seconds) to perform?

Those are what we call microinstructions, basically each instructions is executed in several steps, and the number of steps depends on the cpu architecture and the instruction itself. Modern cpu cores have pipelines, so that you can have, for example, in the same cpu cycle, one instruction being fetched, one being decoded, one being executed, one being stored, etc. However, we can't still assume that a cpu core can totally execute one instruction per cycle, it often takes longer, dependending on the instruction. You can learn more about this if you search about both hyperthreading, cpu microarchitecture and pipelines, with their stages. Then you fing about pipeline stalls and such, and it only becomes more and more complex.
 
  • Like
Reactions: AMT11

TRENDING THREADS