written 5.9 years ago by | modified 5.6 years ago by |
Mumbai University > Computer Engineering > Sem 8 > parallel and distributed systems
written 5.9 years ago by | modified 5.6 years ago by |
Mumbai University > Computer Engineering > Sem 8 > parallel and distributed systems
written 5.6 years ago by |
We need performance matrices so that the performance of different processors can be measured and compared. The performance of a processor majorly depends on the clock speed and it is mentioned by the manufacturers. Following are the measures that can be used to analyze the processor.
1) Arithmetic Mean
This is the simple mean calculated as the sum of times required for every program to run, divided by the total number of programs.
It there are n programs and $k^{\text { th }}$ program requires $T_{k}$ time units, then the arithmetic mean $T_{A}$ is given by,
$T_{A}=\frac{\sum_{k=1}^{n} T_{k}}{n}$
2) Weighted Arithmetic mean
Let there be n different programs running on the system.The probability of execution of a program k is assumed to be $P_k,$ the time taken for that program is $T_k$.Then the weighted arithmetic mean $T_w$ is given by,
$T_{W}=\frac{\sum_{k=1}^{n} T_{k} \cdot P_{k}}{n}$
3) Harmonic Mean
We may not have the execution time for every program in all cases. In such cases we can consider the speed of the program in terms of complexity, Let $M_{k}$ be the speed of $k^{k}$ program, and $P_{k}$ is the probability, then the harmonic mean $S_{H}$ is defined as.
$S_{H}=\frac{n}{\prod^n_{k=1}\left(P_{k} / M_{k}\right)}$
Geometric mean
Sometimes, the speeds of programs may be known as relative to speed of some processor. Then we can have a normalized metric known as geometric mean, represented as $R_{G}$ . It is given by,
$\begin{aligned} R_{G} &=\sqrt[n]{\pi R_{k}}, k=1,2, \ldots, n \\ Where \ R_{k} &=\frac{\text { Time on CPU under consideration }}{\text { Time on reference } C P U} \end{aligned}$
Amdahl's Law revisited
Amdahl's law can be modified, such that if there are some hardware enhancements, then some instructions run faster. With this, we can have Folk theorem given by,
Overall speedup $=\frac{1}{(1-\mathrm{F})+\frac{\mathrm{F}}{\mathrm{S}_{\mathrm{F}}}}$
Where,
F- The fraction of instructions that use enhanced features of hardware.
$S_{F-}$ Speedup enhanced for the fraction of instructions.
CPU performance
The CPU time is given by, CPU time $=\frac{\text { CPU cycles for a program }}{\text { Clock frequency }}$--------(1)
Let IC be the number of instructions executed, i.e instruction count. The number of clocks required to execute one instruction is given by
CPI (Clocks Per Instruction) $=\frac{\text { CPU cycles for a program }}{I C}$---------(2)
Thus, From (i) and (ii)
CPU time $=\frac{I C \times C P I}{\text { Clock frequency }}$