1. Introduction to Computer Architecture
2. Classes of Computers
2.1. Flynn's Taxonomy
-
单指令流单数据流(Single Instruction Stream Single Data Stream, SISD) :早期的单核 PC 采用此架构.
-
单指令流多数据流(Single Instruction Stream Multiple Data Stream, SIMD):一条指令可以处理多条数据流(如向量数据),便于进行流水线操作.
-
多指令流单数据流(Multiple Instruction Stream Single Data Stream, MISD) :理论上的并行计算架构,并不实际存在.
-
多指令流多数据流(Multiple Instruction Stream Multiple Data Stream, MIMD) :每个处理器都可以执行不同的指令流,处理不同的数据流.如多核处理器和计算机集群,能够实现真正的并行计算.
3. Trends | 趋势
4. Quantitative Measurement of Performance
4.1. Performance
- 性能(performance) 是 执行时间(execution time) 的倒数:
- " 比 好 倍":
4.2. Amdahl's Law | 阿姆达尔定律
5. Review: Pipeline
5.1. Introduction to Pipeline
- 流水线(pipeline) 的核心思想是 重叠执行(overlap)——从微观上看每个部件只有一个指令在执行,从宏观上看CPU能在同一时间会处理多条指令.
5.2. Classes of Pipelines
TBD:只有cr老师讲了,到时候把相关课件搬过来.
5.3. Performance Evaluation of Pipelining
TBD
5.4. Hazards of Pipelining
-
冒险的分类:
-
结构冒险(structural hazard):多条指令征用同一资源.
-
数据冒险(data hazard):指令依赖于先前计算的结果,而这一结果尚未准备好(如尚未写回到寄存器组中).
-
控制冒险(control hazard):无法正确预测下一指令的 PC 值,因为可能发生跳转.
-
5.4.1. Data Hazards | 数据冒险
- 不是所有的 RAW 都可以通过 forwarding 解决,如 load-use hazard.这是需要配合插入 bubble 一起解决.