retagged by
824 views
6 votes
6 votes

The clock rate for Machine $\mathrm{A}$ is $2.4 \mathrm{GHz}$, and the clock rate for machine $\text{B}$ is $3.0 \mathrm{GHz}$. For a particular program, the average CPI on machine $\text{A}$ is $1.2.$ For the same program, the average $\mathrm{CPI}$ on machine $\mathrm{B}$ is $2 . 0$. Machine $\text{A}$ is $\text{K}$ times as fast as Machine $\text{B}$, with respect to this program. What is $\mathrm{K}?$

  1. $1$
  2. $4 / 3$
  3. $2$
  4. $3 / 4$
retagged by

1 Answer

5 votes
5 votes
One approach is to calculate the execution time for a typical program, having, say, I machinelevel instructions:
$$
\begin{aligned}
\text { Time }_A & =\text { InstructionCount } \times \text { CPI }_A \times \text { CycleTime }_A \\
& =I \times 1.2 \times \frac{1}{2.4 \times 10^9}=\frac{1}{2} I \times 10^{-9} \\
\text { Time }_B & =\text { InstructionCount } \times \text { CPI }_B \times \text { CycleTime }_B \\
& =I \times 2.0 \times \frac{1}{3.0 \times 10^9}=\frac{2}{3} I \times 10^{-9}
\end{aligned}
$$
So, a typical program will execute (slightly) more quickly on Machine A. More precisely, the relative performance would be:
$$
\frac{\text { Time }_B}{\text { Time }_A}=\frac{\frac{2}{3} I \times 10^{-9}}{\frac{1}{2} I \times 10^{-9}}=\frac{4}{3}
$$
So, Machine $A$ is $4 / 3$ times as fast as Machine $B.$
edited by
Answer:

Related questions

620
views
2 answers
3 votes
GO Classes asked Jan 21
620 views
Suppose we have a four-way set associative physically addressed cache of size $256 \mathrm{KB}$ and $\text{16B}$ blocks, on a machine that uses $32$-bit physical addresses. How many bits will be used for the index?
759
views
3 answers
7 votes
GO Classes asked Jan 21
759 views
Consider a processor with a branch-if-equal instruction that is $32$ bits long$\textsf{: BEQ R12, R11, X.}$ $6$ bits are used to encode the opcode, ... away (the number of instructions) from the $\textsf{BEQ}$ instruction could we reach?
1.2k
views
1 answers
7 votes
GO Classes asked Jan 21
1,193 views
Consider the following code fragment:Identify all data dependencies (potential data hazards) in the given code snippet within one loop iteration. Let the number of true data dependencies ... .What is $\mathrm{X}+2 \mathrm{Y}+3 \mathrm{Z}?$
1.0k
views
1 answers
8 votes
GO Classes asked Jan 21
1,012 views
A computer has a $32$-bit address bus with a direct mapped cache, using $4$ bits for block offset, $16$ tag bits, and $12$ index bits.Which of the following address ... $\textsf{2233 445 5}$ and $\textsf{2233 445 C}$