retagged by
18,022 views
49 votes
49 votes
Consider two processors $P_1$ and $P_2$ executing the same instruction set. Assume that under identical conditions, for the same input, a program running on $P_2$ takes $\text{25%}$ less time but incurs $\text{20%}$ more CPI (clock cycles per instruction) as compared to the program running on $P_1$. If the clock frequency of $P_1$ is $\text{1GHZ}$, then the clock frequency of $P_2$ (in GHz) is ______.
retagged by

7 Answers

1 votes
1 votes

Let's assume values.

$P_1$ takes $10ns$ with $CPI=1$, and clock cycle time = $1ns$ (derived from frequency)

This means

$P_2$ takes $7.5ns$ with $CPI=1.2$, and clock cycle time = $?=xns$


Number of instructions = $10$. (Evident from $P_1$)

For $10$ instructions $P_2$ takes $7.5ns$ (Because they work on same instructions; given)

So, $10*1.2xns=7.5ns$

=> $x=\frac{7.5}{12}$

Frequency = $=\frac{1}{x}=\frac{12}{7.5}=1.6\ GHz$

 

0 votes
0 votes
For P1,

let no. of clocks = 100

clock time  = 1 ns (1/1GHz)

Total time = 100 * 1 ns = 100 ns

For P2,

No. of clocks = 20% more that P1 = 120

Total time = 25% less than P1 = 75 ns

    120 * x = 75 ns

⇒ x = 0.625 ns = 1/0.625 GHz = 1.6 GHz
0 votes
0 votes

We know that Execution time = CPI *$\frac{1}{Clock Rate}$   ………….(1)

P1 :

CPI = x(let)

Execution Time =y (let)

Put in equation 1

y = $\frac{x}{Clock rate}$     (given clock rate for P1 is 1 ghz)

y= $\frac{x}{1 Ghz}$

x = y*1ghz …...…….…….(2)

P2 :

CPI (given it is 20% more than P1) = x+x*$\frac{20}{100}$ =$\frac{120x}{100}$

Execution Time (given it is 25% less than P1) = y-y*$\frac{25}{100}$ =$\frac{75y}{100}$

Put in eq 1

$\frac{75y}{100}$ = $\frac{120x}{100}$ *$\frac{1}{Clock Rate}$

Clock Rate = $\frac{24x}{15y}$ 

Using eq 2

Clock Rate = $\frac{24 *y*1ghz}{15y}$ 

Clock Rate = 1.6 Ghz

Answer:

Related questions

101 votes
101 votes
10 answers
4