动态与静态指令计数 [英] Dynamic vs Static instruction count

查看:134
本文介绍了动态与静态指令计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

动态指令数和静态指令数有什么区别?

What is the difference between dynamic and static instruction count?

一个.导出一个表达式来计算用户 CPU 时间作为函数以下参数:动态指令数(N),每条指令的时钟周期 (CPI) 和时钟频率 (f)

a. Derive an expression to calculate the user CPU time as a function of following parameters: the dynamic instruction count (N), clock cycle per instruction (CPI) and clock frequency (f)

B.解释在问题 3a 中选择动态"指令计数作为参数的原因而不是静态"指令计数

b. Explain the reason for choosing ‘dynamic’ instruction count as a parameter in Question 3a instead of ‘static’ instruction count

推荐答案

动态指令数是 CPU 为特定程序执行实际执行的指令数,而静态指令数是程序拥有的指令数.

The dynamic instruction count is the actual number of instructions executed by the CPU for a specific program execution, whereas the static instruction count is the number of instruction the program has.

我们通常使用动态指令计数,例如您的程序中有一个循环,然后一些指令被执行多次.此外,在存在分支的情况下,某些指令可能根本无法执行.

We usually use dynamic instruction count as if for example you have a loop in your program then some instructions get executed more than once. Also, in the presence of branches, some instructions may not be executed at all.

这篇关于动态与静态指令计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆