136k views
5 votes
Consider two different processors P1 and P2 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 3 GHz clock rate and a CPI of 1.0. Which processor has the highest performance expressed in instructions per second

User Tungken
by
6.2k points

1 Answer

6 votes

Answer:

Processor P2 has the highest performance expressed in instructions per second.

Step-by-step explanation:

Given:

Processors:

P1

P2

Clock rate of P1 = 3 GHz

Clock rate of P2 = 3 GHz

Cycles per instruction = CPI of P1 = 1.5

Cycles per instruction = CPI of P2 = 1.0

To find:

which processor has the highest performance in instructions per second (IPS)

Solution:

Compute CPU time:

CPU time = (Number of instructions * cycles per instruction) / clock rate

CPU time = (I * CPI) / R

We are given the CPI and clock rate. So

CPU time = (I * CPI) / R

I / CPU time = R/CPI

Since

Instructions per second = Number of instructions (I) / execution time

IPS = I / CPU time

So

Instructions Per Second = clock rate / cycles per instruction

IPS = R/CPI

Putting the values in above formula:

Instructions Per Second for P1 = IPS (P1)

= clock rate P1 / CPI (P1)

= 3 GHz / 1.5

IPS (P1) = 2

As 1 GHz = 10⁹ Hz

IPS (P1) = 2x10⁹

Instructions Per Second for P2 = IPS (P2)

= clock rate P2 / CPI (P2)

= 3 / 1.0

IPS (P2) = 3

As 1 GHz = 10⁹ Hz

IPS (P2) = 3x10⁹

Hence processor P2 has the highest performance expressed in instructions per second i.e. 3x10⁹

User Prientus
by
6.4k points