Components

How Does Hyper Threading Work in Intel Core i7 Processors?

You have heard the term Hyper-Threading plenty of times. It is supposed to be some magical technology that doubles the speed of your processor once it is enabled. Companies can either turn it on or off and charge plenty more like a premium.

I would like to say that all of that is complete nonsense and that this article aims to educate you to better understand what Hyper-Threading is. This article will be very newbie friendly.

Preface

In the older days, if Intel or AMD had to make a faster CPU, they would generally increase the potential number of transistors by shrinking them and fitting more in the same space and tried to increase their frequencies (measured in MHz/GHz). All the CPUs only had one single core. CPUs became 32 bit and could handle RAM of up to 4 GB. They later moved to 64 bit CPUs that could handle RAM leaps and bounds more than just 4 GB. Then, it was decided to use multiple cores and spread workloads across these multiple cores for more efficient computing. All cores communicate with one another to distribute any task. Such a task is said to be a multi-threaded task.

Parts of a CPU

A CPU consists of the following parts that work in harmony. As mentioned above, this is going to be an oversimplification. This is simply a crash course and, do not take this information as the word of Gospel. These parts are not listed in any particular order:

  • Scheduler (actually at the OS level)
  • Fetcher
  • Decoder
  • Core
  • Thread
  • Cache
  • Memory and I/O controller
  • FPU (Floating Point Unit)
  • Registers

The functions of these parts are as follows

The memory and I/O controller manage the entry and exit of the data to and from the CPU. The data is brought from the hard disk or SSD on to the RAM, then the more important data is brought into the cache of the CPU. The cache has 3 levels. For eg. the Core i7 7700K has L3 cache of 8 MB. This cache is shared by the entire CPU at 2 MB per core. The data from here is picked up by the faster L2 cache. Every core has its own L2 cache which is 1 MB in total and 256 KB per core. As the case of the Core i7, it has Hyper-Threading. Each core has 2 threads, so this L2 cache is shared by both threads. The L1 cache in total is 256 KB at 32 KB per thread. Here the data then enters the registers which are a total of 8 registers in 32-bit mode and 16 registers in 64-bit mode. The OS (Operating System) schedules processes or instructions to the available thread. As there are 8 threads in an i7, it will switch to and from threads within the cores. OS like Windows or Linux are smart enough to know what are physical cores and what are logical cores.

How does Hyper Threading work?

In a traditional multi-core CPU, each physical core has its own resources and each core consists of a single thread which has independent access to all the resources. Hyper-Threading involves 2 (or in rare cases more) threads sharing the same resources. The scheduler can switch tasks and processes between these threads. 

In a traditional multi-core CPU, the core can “park” or stay idle if it does not have any data or process assigned to it. This state is called starvation and is healthily solved by SMT or Hyper-Threading.

Physical vs Logical Cores (and what are threads)

If you read the spec sheet for almost every Core i5, you will notice that it has 4 physical cores and 4 logical cores or 4 threads(Coffee Lake i5s have 6 cores and 6 threads). All i7s till 7700K are 4 cores and 8 thread/logical cores. In the context of Intel’s CPUs architecture, threads and logical cores are the same thing. They have not changed the layout of their architecture since 1st generation Nehalem all the way till today with Coffee Lake so this information will hold up. This information will not be enough for older AMD CPUs, but Ryzen has also changed a lot of their layout, and their processors are now similar in design to Intel’s.

Advantages of Hyper Threading

  • Hyper-Threading solves the problem of “starvation”. If a core or thread is free, the scheduler can pass the data to it instead of the core remaining idle or waiting for some other new data to flow through it.
  • Much larger and parallel workloads can be done with greater efficiency. As there are more threads to parallelize, applications that depend heavily on multiple threads can boost their work significantly (not twice as fast though).
  • If you are gaming and have some sort of important task running in the background, the CPU will not struggle to provide adequate frames and run that task smoothly as it can switch resources between threads.

Disadvantages of Hyper Threading

The following are not much of disadvantages, rather they are more inconveniences.

  • Hyper-Threading needs implementation from software level to take advantage of. Even though more and more applications are being developed to take advantage of multiple threads, applications that do not take advantage of any SMT (Simultaneous Multi-Threading) technology or even multiple physical cores will run exactly the same regardless. Performance of these applications are more dependent on the clock speed and IPC of a CPU.
  • Hyper-Threading can cause the CPU to create more heat. This is why i5s used to clock much higher than i7s because they would not heat as much as they have fewer threads.
  • Multiple threads share the same resources within a core. This is why performance does not double. It is instead a very clever method to maximize efficiency and boost performance where ever possible.

Conclusion

Hyper-Threading is old technology but one here to stay. As applications get more and more demanding, and the increasing death rate of Moore’s law, the ability to parallelize workloads has helped improve performance significantly. Being able to run partially parallel workloads helps increase your productivity and gets your work done faster without stuttering. And if you’re looking to buy the best motherboard for your 7th generation i7 processor then take a look at this article.

#PreviewNameNVIDIA SLIAMD CrossFireVRM PhasesRGBPurchase
1ASUS MAXIMUS IX FORMULAyesyes10yes
Check Price
2MSI Arsenal Gaming Intel Z270noyes10no
Check Price
3MSI Performance Gaming Intel Z270yesyes11yes
Check Price
4ASRock Gaming K6 Z270yesyes10+2yes
Check Price
5GIGABYTE AORUS GA-Z270X Gaming 8yesyes11yes
Check Price
#1
Preview
NameASUS MAXIMUS IX FORMULA
NVIDIA SLIyes
AMD CrossFireyes
VRM Phases10
RGByes
Purchase
Check Price
#2
Preview
NameMSI Arsenal Gaming Intel Z270
NVIDIA SLIno
AMD CrossFireyes
VRM Phases10
RGBno
Purchase
Check Price
#3
Preview
NameMSI Performance Gaming Intel Z270
NVIDIA SLIyes
AMD CrossFireyes
VRM Phases11
RGByes
Purchase
Check Price
#4
Preview
NameASRock Gaming K6 Z270
NVIDIA SLIyes
AMD CrossFireyes
VRM Phases10+2
RGByes
Purchase
Check Price
#5
Preview
NameGIGABYTE AORUS GA-Z270X Gaming 8
NVIDIA SLIyes
AMD CrossFireyes
VRM Phases11
RGByes
Purchase
Check Price

Last Update on 2019-05-24 at 08:12 / Affiliate links / Images from Amazon Product Advertising API

Appuals.com is a participant in the Amazon Services LLC Associates Program, and we get a commission on purchases made through our links.

Leave a Reply

Your email address will not be published.

Close