Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic vs Static instruction count

What is the difference between dynamic and static instruction count?

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. Explain the reason for choosing ‘dynamic’ instruction count as a parameter in Question 3a instead of ‘static’ instruction count

like image 300
Assasins Avatar asked Nov 19 '12 16:11

Assasins


1 Answers

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.

like image 200
gusbro Avatar answered Sep 22 '22 23:09

gusbro