执行时间(latency等待时间)

上传人:j****9 文档编号:57211185 上传时间:2018-10-20 格式:PPT 页数:30 大小:112.50KB
返回 下载 相关 举报
执行时间(latency等待时间)_第1页
第1页 / 共30页
执行时间(latency等待时间)_第2页
第2页 / 共30页
执行时间(latency等待时间)_第3页
第3页 / 共30页
执行时间(latency等待时间)_第4页
第4页 / 共30页
执行时间(latency等待时间)_第5页
第5页 / 共30页
点击查看更多>>
资源描述

《执行时间(latency等待时间)》由会员分享,可在线阅读,更多相关《执行时间(latency等待时间)(30页珍藏版)》请在金锄头文库上搜索。

1、1,Performance Measurement 1,PerformanceExecution time 执行时间(latency等待时间):Time between the start and the completion of an event 一个事件从开始到结束所经过的时间Performance 1/(Execution time) 性能与执行时间成反比Throughput吞吐量 (bandwidth带宽): Total amount of work done in a given time 给定时间内完成的全部工作,2,Performance Measurement 1,Machi

2、ne X is n% faster than Machine Y: 机器X比机器Y快 n%,3,Performance Measurement 2,Example: Machine A runs a program in 10 seconds,Machine B runs the same program in 15 seconds,A is _% faster than B.,4,Make the Common Case Fast,Perhaps the most important and pervasive principle of computer design is to make

3、the common case fast: In making a design trade-off, favor the frequent case over the infrequent case. 计算机设计的最重要的原则就是:加快经常性发生事件的执行速度。,5,Make the Common Case Fast,Improving the frequent event, rather than the rare event, will obviously help performance. Overflow case and no overflow case in addition 提

4、高频繁事件的执行速度,而不是提高罕见事件的执行速度,将带来明显的性能上的提高 例如加法运算中的溢出和非溢出情况,6,Amdahls Law 1,Amdahls Law states that the performance improvement to be gained from using some faster mode of execution is limited by the fraction of the time the faster mode can be used. 阿姆达定律表明:通过改进某模式得到的整体性能提高,受限于该改进模式所占的运行时间比例。,7,Amdahls

5、Law 2,Speedup (加速比)= Performance for entire task using the enhancement when possible(改进后完成整个任务的性能)Performance for entire task w/o using the enhancement (改进前完成整个任务的性能)=Execution time for entire task w/o using the enhancement(改进前完成整个任务的时间)Execution time for entire task using the enhancement when possi

6、ble (改进前完成整个任务的时间),8,Amdahls Law 3,Execution timenew= Execution timeold xwhere fE: fraction of enhancementsE: improvement gained by theenhancement mode即:新的执行时间= 原来执行时间x,9,Amdahls Law 3, Speedup = 即:加速比原来的执行时间/新的执行时间1,10,Amdahls Law 4,Example: An enhancement run 10 times faster than the original mach

7、ine, but it is usable 40% of the time, then the speedup = _. Sol:fE = 0.4sE = 10 Speedup = 1/(1-0.4) + 0.4/10)= 1.56,11,Amdahls Law can also be applied to compare two CPU design alternatives, for example : Implementations of floating-point(FP)square root vary significantly in performance, especially

8、 among processors designed for graphics. Suppose FP square root(FPSQR) is responsible for 20% of the execution time of a critical graphics benchmark. One proposal is to enhance the FPSQR hardware and speed up this operation by a factor of 10. The other alternative is just to try to make all FP instr

9、uctions in the graphics processor run faster by a factor of 1.6; FP instructions are responseible for a total of 50% of the execution time for the application. Compare these two design alternatives.,Amdahls Law can also be applied to compare two CPU design alternatives, for example : Implementations

10、 of floating-point(FP) square root vary significantly in performance, especially among processors designed for graphics. Amdahls Law也可以用于比较两种设计不同的CPU,特别是对于处理图形的处理器来说,求浮点数平方根的不同实现方法在性能上有很大差异。,12,Amdahls Law can also be applied to compare two CPU design alternatives, for example : Implementations of f

11、loating-point(FP)square root vary significantly in performance, especially among processors designed for graphics. Suppose FP square root(FPSQR) is responsible for 20% of the execution time of a critical graphics benchmark. One proposal is to enhance the FPSQR hardware and speed up this operation by

12、 a factor of 10. The other alternative is just to try to make all FP instructions in the graphics processor run faster by a factor of 1.6; FP instructions are responseible for a total of 50% of the execution time for the application. Compare these two design alternatives.,Suppose FP square root(FPSQ

13、R) is responsible for 20% of the execution time of a critical graphics benchmark. One proposal is to enhance the FPSQR hardware and speed up this operation by a factor of 10. The other alternative is just to try to make all FP instructions in the graphics processor run faster by a factor of 1.6; FP

14、instructions are responseible for a total of 50% of the execution time for the application. Compare these two design alternatives. 例如,求浮点数平方根的操作,在一个标准测试程序中占总执行时间的20%。一种方法是改进FPSQR硬件,将它的操作速度提10倍。另一种方法是将所有图形处理器中的FP指令的执行速度都提高1.6倍,这些FP指令在总的执行时间中占50%比较这两种设计方法。,13,Answer: we can compare these two alternati

15、ves by comparing the speedups:Improving the performance of the FP operations overall is slightly better because of the higher frequency.,Answer: we can compare these two alternatives by comparing the speedups:(可以通过计算加速比来进行比较)Improving the performance of the FP operations overall is slightly better b

16、ecause of the higher frequency.(可见提高所有FP操作的性能的方案要好, 这是由于它们的执行频率较高),14,Amdahls Law 6,Extreme Cases 极限情况fE = 0 Speedup = 1 fE = 1 Speedup = sE fE 增强比例sE 增强加速比,15,CPU Performance 1,Most computers are constructed using a clock running at a constant rate 多数计算机的运行都基于一个固定频率的时钟信号 Referred to by length/time, e.g., 10 ns, or rate, e.g., 100 MHz ms = 103 sec, s = 106 sec, ns = 109 sec Hz = 1/sec, KHz = 103 Hz, MHz = 106 Hz, GHz = 109 Hz,Clock cycle time = 1/ clock rate,

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号