Multi-Threading
Concepts
- 我們在一個 core 中維護多個 thread (instruction stream)
- 這些 threads 會共用一組 ALU 但在 cache 上有獨立的 execution context
- 當其中一個 thread stall 的時候,我們就可以先換成執行另一個 thread
- 這樣我們就可以最大化利用一個 core 上的 ALU

Hyper-Threading 是 Intel 提出的一種 Multi-threading 技術
Pros & Cons
Pros
- Use ALU more efficiently
- Hide memory latency
Cons
- Additional storage for execution context
- Longer run time for every thread
- Relies highly on memory bandwith
- more threads → larger working sets → less cache space per thread
- go to memory more often, but can hide memory access latency