{时间管理}执行时间latency等待时间

上传人:精****库 文档编号:141421838 上传时间:2020-08-07 格式:PPTX 页数:30 大小:152.35KB
返回 下载 相关 举报
{时间管理}执行时间latency等待时间_第1页
第1页 / 共30页
{时间管理}执行时间latency等待时间_第2页
第2页 / 共30页
{时间管理}执行时间latency等待时间_第3页
第3页 / 共30页
{时间管理}执行时间latency等待时间_第4页
第4页 / 共30页
{时间管理}执行时间latency等待时间_第5页
第5页 / 共30页
点击查看更多>>
资源描述

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

1、Performance Measurement 1,Performance Execution 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给定时间内完成的全部工作,1,Performance Measurement 1,Machin

2、e X is n% faster than Machine Y:机器X比机器Y快 n%,2,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.,3,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. 计算机设计的最重要的原则就是:加快经常性发生事件的执行速度。,4,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、高频繁事件的执行速度,而不是提高罕见事件的执行速度,将带来明显的性能上的提高 例如加法运算中的溢出和非溢出情况,5,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. 阿姆达定律表明:通过改进某模式得到的整体性能提高,受限于该改进模式所占的运行时间比例。,6,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

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

7、iginal machine, but it is usable 40% of the time, then the speedup = _. Sol:fE = 0.4 sE = 10 Speedup= 1/(1-0.4) + 0.4/10) = 1.56,10,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,

8、 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 a factor of 10. The other alternative is just to try to make a

9、ll 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.,Amdahls Law can also be applied to compare two CPU design alternatives, for example :Imple

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

11、ions of floating-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 ope

12、ration 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 instructions are responseible for a total of 50% of the execution time for the application. Compare these two design alternatives.,Suppose FP square

13、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 instructions in the graphics processor run faster by a factor of

14、 1.6; FP 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% 比较这两种设计方法。,12,Answer: we can compare these two

15、 alternatives 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 slig

16、htly better because of the higher frequency. (可见提高所有FP操作的性能的方案要好, 这是由于它们的执行频率较高),13,Amdahls Law 6,Extreme Cases 极限情况 fE = 0 Speedup = 1 fE = 1 Speedup = sE fE 增强比例 sE 增强加速比,14,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

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 企业文档

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