225k views
1 vote
A common fallacy is to use MIPS (millions of instructions per second) to compare the performance of two different processors, and consider that the processor with the largest MIPS has the largest performance. Check if this is true for P1 and P2.

User MGPJ
by
3.9k points

2 Answers

3 votes

Answer:

Step-by-step explanation:

So, using the 1 Ghz = 10⁹ Hz, we get that

CPU time₁ = 5 x 10⁹ x 0.9 / 4 Gh

= 4.5 x 10⁹ / 4 x 10⁹Hz = 1.125 s

and,

CPU time₂ = 1 x 10⁹ x 0.75 / 3 Ghz

= 0.75 x 10⁹ / 3 x 10⁹ Hz = 0.25

User Paul Bastian
by
4.3k points
1 vote

The question is incomplete. It can be found in search engines. However, kindly find the complete question below:

Question

Cites as a pitfall the utilization of a subset of the performance equation as a performance metric. To illustrate this, consider the following two processors. P1 has a clock rate of 4 GHz, average CPI of 0.9, and requires the execution of 5.0E9 instructions. P2 has a clock rate of 3 GHz, an average CPI of 0.75, and requires the execution of 1.0E9 instructions. 1. One usual fallacy is to consider the computer with the largest clock rate as having the largest performance. Check if this is true for P1 and P2. 2. Another fallacy is to consider that the processor executing the largest number of instructions will need a larger CPU time. Considering that processor P1 is executing a sequence of 1.0E9 instructions and that the CPI of processors P1 and P2 do not change, determine the number of instructions that P2 can execute in the same time that P1 needs to execute 1.0E9 instructions. 3. A common fallacy is to use MIPS (millions of instructions per second) to compare the performance of two different processors, and consider that the processor with the largest MIPS has the largest performance. Check if this is true for P1 and P2. 4. Another common performance figure is MFLOPS (millions of floating-point operations per second), defined as MFLOPS = No. FP operations / (execution time x 1E6) but this figure has the same problems as MIPS. Assume that 40% of the instructions executed on both P1 and P2 are floating-point instructions. Find the MFLOPS figures for the programs.

Answer:

(1) We will use the formula:

CPU time = number of instructions x CPI / Clock rate

So, using the 1 Ghz = 10⁹ Hz, we get that

CPU time₁ = 5 x 10⁹ x 0.9 / 4 Gh

= 4.5 x 10⁹ / 4 x 10⁹Hz = 1.125 s

and,

CPU time₂ = 1 x 10⁹ x 0.75 / 3 Ghz

= 0.75 x 10⁹ / 3 x 10⁹ Hz = 0.25 s

So, P2 is actually a lot faster than P1 since CPU₂ is less than CPU₁

(2)

Find the CPU time of P1 using (*)

CPU time₁ = 10⁹ x 0.9 / 4 Ghz

= 0.9 x 10⁹ / 4 x 10⁹ Hz = 0.225 s

So, we need to find the number of instructions₂ such that CPU time₂ = 0.225 s. This means that using (*) along with clock rate₂ = 3 Ghz and CPI₂ = 0.75

Therefore, numbers of instruction₂ x 0.75 / 3 Ghz = 0.225 s

Hence, numbers of instructions₂ = 0.225 x 3 x 10⁹ / 0.75 = 9 x 10⁸

So, P1 can process more instructions than P2 in the same period of time.

(3)

We recall that:

MIPS = Clock rate / CPI X 10⁶

So, MIPS₁ = 4GHZ / 0.9 X 10⁶ = 4 X 10⁹HZ / 0.9 X 10⁶ = 4444

MIPS₂ = 3GHZ / 0.75 X 10⁶ = 3 x 10⁹ / 0.75 X 10⁶ = 4000

So, P1 has the bigger MIPS

(4)

We now recall that:

MFLOPS = FLOPS Instructions / time x 10⁶

= 0.4 x instructions / time x 10⁶ = 0.4 MIPS

Therefore,

MFLOPS₁ = 1777.6

MFLOPS₂ = 1600

Again, P1 has the bigger MFLOPS

User David Tew
by
4.1k points