# 同时多线程

**同时多线程**（Simultaneous multithreading，SMT）是一种处理器设计技术，允许多个独立的硬件线程在单个周期内向超标量处理器的多个功能单元发射指令，填补空闲的执行槽位，从而提高单核的吞吐量。<sup>[1](https://doi.org/10.1145/223982.224449)</sup> 英特尔的商业实现称为[超线程](https://www.edgepedia.org/zh/hyper-threading)技术（Hyper-Threading Technology），它使单个物理处理器在软件看来如同两个逻辑处理器。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 由华盛顿大学的迪恩·塔尔森、苏珊·埃格斯和亨利·利维在 ISCA 1995 论文《同时多线程》中提出<sup>[1](https://doi.org/10.1145/223982.224449)</sup> |
| 动机 | 即便是 8 发射的超标量架构也无法维持每周期 1.5 条指令的吞吐量，而细粒度多线程处理器无论运行多少线程，都只能利用宽超标量处理器约 40% 的资源<sup>[3](https://swh.princeton.edu/~rblee/ELE572Papers/SMT_Eggers.pdf)</sup> |
| 首次商业应用 | 英特尔超线程技术，随奔腾4（Pentium 4）处理器于 2002 年 11 月 14 日以 3.06 GHz 频率推出<sup>[4](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)</sup> |
| 宣称收益 | 英特尔表示超线程技术可将 PC 性能提升最高 25%<sup>[4](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)</sup> |
| 硬件成本 | AMD 工程师估计，在 Zen 4 和 Zen 5 核心中，SMT 占用的核心面积不足 5%<sup>[5](https://www.amd.com/en/blogs/2025/simultaneous-multithreading-driving-performance-a.html)</sup> |
| 线程数量 | POWER5 和 POWER6 每核提供两个 SMT 线程；POWER7 提供四个，可配置为 SMT4、SMT2 或单线程模式<sup>[6](https://www.redbooks.ibm.com/redbooks/pdfs/sg248079.pdf)</sup> |
| 安全风险 | SMT 资源共享在共享同一核心的线程之间形成基于争用的隐蔽信道<sup>[7](https://www.usenix.org/conference/usenixsecurity22/presentation/taram)</sup> |

## 工作原理

超标量处理器包含多个功能单元，但单个线程很少能提供足够的并行指令使所有单元保持忙碌。1995 年华盛顿大学的研究量化了这一差距：8 发射超标量架构无法维持每周期 1.5 条指令的吞吐量，而细粒度多线程处理器——即能够每周期无代价切换上下文的处理器——无论运行多少线程，都只能利用宽超标量处理器约 40% 的资源。<sup>[3](https://swh.princeton.edu/~rblee/ELE572Papers/SMT_Eggers.pdf)</sup> SMT 的不同之处在于，它允许来自不同线程的指令在同一周期内占用功能单元，因此吞吐量主要受限于处理器的发射带宽，而非任何单一线程的并行度。<sup>[3](https://swh.princeton.edu/~rblee/ELE572Papers/SMT_Eggers.pdf)</sup>

在英特尔超线程等商业实现中，一个物理核心呈现为两个逻辑处理器。物理执行资源——包括缓存、执行单元和总线——是共享的，而每个逻辑处理器拥有自己的架构状态，包括各自的一组通用寄存器和控制寄存器。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup><sup> • </sup><sup>[8](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/001/intel-hyper-threading-technology/)</sup> 从微架构角度看，两个逻辑处理器的指令同时驻留并在共享执行资源上并行执行。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup> 该功能通过 BIOS 启用，并需要操作系统支持。<sup>[8](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/001/intel-hyper-threading-technology/)</sup>

收益取决于工作负载的行为。当一个线程因缓存缺失而停顿，另一个线程可以继续执行——IBM 就是这样描述 POWER 处理器上的这一机制的。<sup>[9](https://www.ibm.com/docs/en/power6?topic=hypervisor-simultaneous-multi-threading)</sup> 代价是：利用率的提高以单个线程的性能为代价换取了处理器整体吞吐量的提升。<sup>[10](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-619.html)</sup>

## 历史与应用

SMT 于 1995 年作为多线程概念的演进被提出，塔尔森、埃格斯和利维的论文通过基于模拟的加速比在多个 SMT 机器模型上考察了该技术。<sup>[1](https://doi.org/10.1145/223982.224449)</sup><sup> • </sup><sup>[11](https://dada.cs.washington.edu/smt/)</sup> 后续工作表明，无需对传统宽发射超标量处理器做大规模改动即可实现吞吐量增益，且 SMT 相比单芯片多处理器具有优势，因为它每个周期动态地将执行资源分配到需要的地方。<sup>[12](https://homes.cs.washington.edu/~levy/ISCA96.pdf)</sup>

英特尔于 2001 年宣布为服务器至强（Xeon）处理器引入超线程技术，并于 2002 年 11 月随 3.06 GHz 的[奔腾4](https://www.edgepedia.org/zh/pentium-4) 出货——这是首款运行频率达到每秒 30 亿周期的商用微处理器。<sup>[4](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)</sup><sup> • </sup><sup>[13](https://www.intel.com/pressroom/archive/releases/2001/20010828comp.htm)</sup> 该技术随后在奔腾4 和至强产品线中推广开来。<sup>[14](https://www.intel.com/pressroom/archive/speeches/otellini20030916.htm)</sup> 在 IBM POWER 方面，POWER5 和 POWER6 每核运行两个线程，POWER7 将此扩展至每核四个硬件线程。<sup>[6](https://www.redbooks.ibm.com/redbooks/pdfs/sg248079.pdf)</sup> AMD 的 Zen 核心实现 2 路 SMT。<sup>[5](https://www.amd.com/en/blogs/2025/simultaneous-multithreading-driving-performance-a.html)</sup>

## 性能与能耗权衡

SMT 的增益随工作负载组合而变化。英特尔 2002 年发布时宣称，多线程软件和多任务处理可获得最高 25% 的性能提升。<sup>[4](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)</sup> AMD 认为，SMT 在不显著增加处理器整体功耗的情况下提升性能，对许多工作负载而言这意味着能效提升；硅片成本很小，SMT 逻辑在 [Zen 4](https://www.edgepedia.org/zh/zen-4) 和 Zen 5 中占用的核心面积不足 5%。<sup>[5](https://www.amd.com/en/blogs/2025/simultaneous-multithreading-driving-performance-a.html)</sup>

实测研究显示了两个方向的结果。在一项基于 PARSEC 的能耗表征中，SMT 在某种输入规模下改善了大多数工作负载的能效，其中 ferret 在原生规模下能效提升最高达 26.8%，但工作负载 swaptions 在中等输入规模下能效下降了 25.2%，而 raytrace 等内存密集型应用因共享资源争用抵消了功耗节省而损失了效率。<sup>[15](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0188428)</sup> 在一项类 POWER4/POWER5 核心上 SMT 与片上多处理（CMP）的等面积比较中，对于 CPU 密集型基准测试，CMP 在性能和能效方面均优于 SMT，但对于内存密集型基准测试，SMT 因具有更大的 L2 缓存而更优。<sup>[16](https://vlsiarch.eecs.harvard.edu/publications/performance-energy-and-thermal-considerations-smt-and-cmp-architectures)</sup>

资源争用也使调度变得复杂。在片上多处理器中加入 SMT 会在流水线资源层面引入争用，并增加活跃线程数量，这可能降低性能稳定性和公平性；基于在 SMT 线程之间划分指令取指、指令队列和保留站的硬件控制已被原型验证，用于区分线程级性能。<sup>[17](https://www.usenix.org/conference/hotpar12/smt-qos-thread-level-performance-differentiation-intel-nehalem-processor)</sup>

## 安全

线程之间共享流水线资源会形成信道，一个线程可以通过这些信道观察另一个线程的资源使用情况。在 USENIX Security 2022 上发表的 SecSMT 首次对高性能 SMT 处理器中基于争用的安全漏洞进行了全面分析，刻画了整个共享流水线中的争用以及每种资源由此产生的泄漏信道，并提出了统一的缓解与隔离策略，在保留大部分 SMT 性能的同时减少泄漏。<sup>[7](https://www.usenix.org/conference/usenixsecurity22/presentation/taram)</sup>

## References

1. [Tullsen, Eggers, Levy (1995). Simultaneous multithreading. Proceedings of the 22nd Annual International Symposium on Computer Architecture.](https://doi.org/10.1145/223982.224449)
2. [Marr et al. (2002). Hyper-Threading Technology Architecture and Microarchitecture. Intel Technology Journal, Vol. 6, Issue 1.](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)
3. [Tullsen, Eggers, Levy. Simultaneous Multithreading: Maximizing On-Chip Parallelism (paper PDF).](https://swh.princeton.edu/~rblee/ELE572Papers/SMT_Eggers.pdf)
4. [Intel (November 14, 2002). Intel Delivers Hyper-Threading Technology With Pentium 4 Processor 3 GHz Milestone.](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)
5. [AMD (2025). Simultaneous Multithreading: Driving Performance and Efficiency on AMD EPYC CPUs.](https://www.amd.com/en/blogs/2025/simultaneous-multithreading-driving-performance-a.html)
6. [IBM (2010). POWER7 and POWER7+ Optimization and Tuning Guide.](https://www.redbooks.ibm.com/redbooks/pdfs/sg248079.pdf)
7. [Taram et al. (2022). SecSMT: Securing SMT Processors against Contention-Based Covert Channels. USENIX Security Symposium.](https://www.usenix.org/conference/usenixsecurity22/presentation/taram)
8. [Intel. 12th Generation Intel Core Processors Datasheet, Volume 1 of 2: Intel Hyper-Threading Technology.](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/001/intel-hyper-threading-technology/)
9. [IBM. Simultaneous multi-threading (POWER6 hypervisor documentation).](https://www.ibm.com/docs/en/power6?topic=hypervisor-simultaneous-multi-threading)
10. [University of Cambridge Computer Laboratory. Technical Report UCAM-CL-TR-619.](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-619.html)
11. [Simultaneous Multithreading project home page, University of Washington.](https://dada.cs.washington.edu/smt/)
12. [Tullsen, Eggers, Emer, Levy, Lo, Stamm (1996). Exploiting Choice: Instruction Fetch and Issue on an Implementable Simultaneous Multithreading Processor. ISCA 1996.](https://homes.cs.washington.edu/~levy/ISCA96.pdf)
13. [Intel (August 28, 2001). Intel Demonstrates Breakthrough Processor Design.](https://www.intel.com/pressroom/archive/releases/2001/20010828comp.htm)
14. [Otellini keynote, IDF Fall 2003, Intel.](https://www.intel.com/pressroom/archive/speeches/otellini20030916.htm)
15. [Evaluating architecture impact on system energy efficiency. PLOS One (2017).](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0188428)
16. [Performance, energy, and thermal considerations for SMT and CMP architectures. Harvard Architecture, Circuits and Compilers group.](https://vlsiarch.eecs.harvard.edu/publications/performance-energy-and-thermal-considerations-smt-and-cmp-architectures)
17. [SMT QoS: Hardware Prototyping of Thread-level Performance Differentiation Mechanisms. USENIX HotPar 2012.](https://www.usenix.org/conference/hotpar12/smt-qos-thread-level-performance-differentiation-intel-nehalem-processor)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Processors & processor engineering › Computer architecture theory › Multithreading and parallel architectures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/simultaneous-multithreading

English original: https://www.edgepedia.org/simultaneous-multithreading
