Hyper-threading (Simultaneous Multi Threading - SMT)
- When a core-supports hyper-threading the physical core is split into two or more logical cores
- This is done by having 2x or more registers (and other resources), so that 2 or more thread execution contexts can be stored in the core at the same time
- When a thread leaves it can store it’s context onto one set of registers and the next thread’s context is loaded onto the other set of registers. Because of this when thread 1 comes back, it doesn’t have to load it’s context from data to the registers
- Given
n
registers, a register’s data is replaced only when treadn+1
acquires the core
Hyper-threading means that when the worker leaves he can store his tools (thread context) in the desk (core) and the second worker can come in with his tools and can store his tools when he leaves. When the first worker comes back he can simply pick his tools from the desk and start working.
Related
Refs
- https://stackoverflow.com/questions/14143329/difference-b-w-hyper-threading-and-multithreading - terms are a little off but logic is brilliant