Multi Level Parallelism


 
 
 
 
能量=1/2负载电容V^2
 
 
Rules of Thumb:经验之谈
单点故障(英语:single point of failure,缩写SPOF)是指系统中一点失效,就会让整个系统无法运作的部件,换句话说,单点故障即会整体故障。
Formula:公式
Utilization:利用
Domain:领域
Warehouse Scale Computer:仓库级电脑
coherent multiprocessor:相干多处理器
the Board of Directors:董事会
a member of the faculty:全体教员中的一员
Equivalent:等同等效的
Demystify:阐明、启发
Conservative:保守的
Soar:急升,高达
Negligible:微不足道的
low-end:低档的;廉价的
Combination:组合,联合体
Dramatic:戏剧性的,夸张地,急剧的
Fourfold:四倍的/地
Outperform:胜过,优于
“Like the scholars of the European Renaissance, computer architects must understand our own history, and then combine the lessons of that history with new techniques to remake the world.”
With the end of Dennard scaling a decade ago, and the recent slowdown of Moore’s Law due to a combination of physical limitations and economic factors, the sixth edition of the preeminent textbook for our field couldn’t be more timely.Here are some reasons.
First, because domain-specific architectures can provide equivalent performance and power benefits of three or more historical generations of Moore’s Law and Dennard scaling, they now can provide better implementations than may ever be possible with future scaling of general-purpose architectures. And with the diverse application space of computers today, there are many potential areas for architectural innovation with domain-specific architectures. Second, high-quality implementations of open-source architectures now have a much longer lifetime due to the slowdown in Moore’s Law. This gives them more opportunities for continued optimization and refinement, and hence makes them more attractive. Third, with the slowing of Moore’s Law, different technology components have been scaling heterogeneously. Furthermore, new technologies such as 2.5D stacking, new nonvolatile memories, and optical interconnects have been developed to provide more than Moore’s Law can supply alone. To use these new technologies and nonhomogeneous scaling effectively, fundamental design decisions need to be reexamined from first principles. Hence it is important for students, professors, and practitioners in the industry to be skilled in a wide range of both old and new architectural techniques. All told, I believe this is the most exciting time in computer architecture since the industrial exploitation of instruction-level parallelism in microprocessors 25 years ago.
专用和通用结构DSAs的对比
The RISC-based machines focused the attention of designers on two critical performance techniques, the exploitation of instruction-level parallelism (initially through pipelining and later through multiple instruction issue) and the use of caches (initially in simple forms and later using more sophisticated organizations and optimizations).
Inter将x86指令转换为类risc指令以提高性能,在pc机上转换带来的硬件开销可忽略,而低端应用如手机等则不行,促使产生另一种risc架构——arm。
一、量化设计与研究基础
1、功率能耗趋势
 
 
2、成本趋势
 
 
 
 
3、可信任度
 
 
4、性能度量
执行时间定义:挂钟时间(响应时间)、CPU时间
基准测试
5、计算机设计的量化原理
充分利用并行性、局域性原理、优先优化主要部分、amdahl定律、
 
 
二、存储器结构层次设计
解决存储墙问题——多级缓存的拓展、更高级的填充和预取方案、编译器及程序员对局部性原理的理解、DRAM等新兴技术的应用;引入乱序流水线(并行机制)、
采用多级存储结构
处理器和DRAM存储器性能差距,带宽差距;多级缓存带来的功耗问题
缓存缺失问题:


降低缺失率的方法(注意每种的缺点):增大快、增大缓存、提高相关联程度、采用多级缓存、为读取缺失指定高于写入操作的优先级、在缓存索引期间避免地址转换
- 存储技术和优化
SRAM、DRAM、SDRAM(同步DRAM)、DDR、RAS、CAS、DIMM阵列、GDRAM、堆叠式DRAM(垂直堆叠3d、中介层堆叠2.5d)
闪存(读取速度比磁盘快300倍比DDR慢150倍,可替代其作外存但不能替代DRAM作主存)、相变存储器PCM
存储器可靠性——奇偶校验、ECC、Chipkill技术
- 提高缓存性能:
第一种优化:小而简单的第一级缓存,用以缩短命中时间、降低功率(使用较高相联度)
第二种优化:采用路预测以缩短命中时间
第三种优化:实现缓存访问的流水化,以提高缓存带宽(以及存储体的多体方式并行访问)
第四种优化:采用非阻塞缓存(nonblocking cahce,“缺失时仍命中”,降低缺失代价),支持多独立访问
编译器软件优化、合并写缓存区(减少对齐产生的浪费)、硬件预取、编译器预取
第五种优化:采用多种缓存以提高缓存带宽
…

- 虚拟存储器和虚拟机
VMM及其指令集支持、自主取指单元、推测与存储器访问(前期预取缺失率换取后期实际缺失率,减少流水线停顿次数)
- ARM Cotex-A53及Intel Core i7 6700存储器层次结构实例 - 各级缓存缺失率及其影响的计算 
三、指令级并行ILP及其应用
1、指令集并行概念及挑战
硬件动态实现和软件编译器静态实现;其局限性和向多核化发展
流水线CPI=理想CPI+结构化/数据冒险/控制停顿

基本块、循环级并行(针对循环,硬件动态展开或编译器静态展开进行并行)
数据依赖(硬件解决的局限性,关键靠编译器检测依赖关系)【指令i生成的结果被指令j用到、依赖链】、名称依赖(写的顺序问题,寄存器重命名)和数据冒险
控制依赖(分支指令后的指令不能放前面来,之前的也不能拿进来)【控制依赖不不重要,重要的是保护异常行为(不得改变程序抛出异常的方式)和数据流(数据依赖)这两个特性】
可调换的程序执行顺序(破坏控制依赖而不影响两大特性)——判断控制指令到跳转位置之间指令的活性(结果是否被后续指令使用)
推测技术——解决两大特性中的依赖问题
2、利用ILP的基本编译器技术
编译器调度和循环展开(利用流水线延迟,避免停顿,无结构冒险【假设功能单元被完全流水化和复制】)
具体策略:

限制循环展开的因素:寄存器紧缺;代码规模增大导致缓存缺失率上升;每次展开操作分摊的开销降低
3、高级分支预测降低分支成本
分支预测降低分支造成的性能损失
- 局部预测器(毕设使用,两级表,分支地址索引) 
- 相关分支预测器——2位预测器、相关预测器【(m,n)预测器】、 - (m,n)预测器,使用m个分支的全局历史(移位寄存器)在2^m个分支预测器中选择,每个是一个n位预测器。索引是分支地址的低位加全局分支部分位;一个(m,n)预测器的位数为——2^m * n * 由分支地址选中的预测项的数目
 
- 竞争预测器——全局、局部预测器和选择器(也是一个2位预测器)组成 
- 带标签的混合预测器 - 多个预测器,依次根据pc和不同长度的分支历史进行索引,每次索引与预测器中标签比对,不匹配则向下继续索引比对,直至选出一个独处于该分支的预测项。第一级由于无标签必被选中。 - 标签是为了防止多个分支索引至同一表项而发生相互覆盖,导致正确率下降 - 初始化方法——预测器包含有效位判断是否使用;根据预测方向(前向分支和后向分支)初始化