Consider two different implementations of the same instruction

Open question

2022-02-04

Consider two different implementations of the same instruction set architecture. The instructions can be divided into four classes according to their CPI (class A, B, C, and D). P1 with a clock rate of 3GHz and CPIs of 1, 2, 2, and 3, and P2 with a clock rate of 4 GHz and CPIs of 2, 3, 1, and 2.

Given a program with a dynamic instruction count of 1.0E6 instructions divided into classes as follows: 10% class A, 20% class B, 50% class C, and 20% class D, which implementation is faster?

  1. What is the global CPI for each implementation?
  2. Find the clock cycles required in both cases.

 

1.7 Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dynamic instruction count of 1.1E9 and has an execution time of 1.3s, which compiler B results in a dynamic instruction count of 1.3E9 and an execution time of 1.5s.  

  1. Find the average CPI for each program given that the processor has a clock cycle time of 1ns
  2. Assume the compiled programs run on two different processors. If the execution times on the two processors are the same, how much faster is the clock of the processor running compiler A's code versus the clock of the processor running compiler B's code?
  3. A new compiler is developed that uses only 6.0E8 instructions and has an average CPI of 1.2. What is the speedup of using this new compiler versus using compiler A or B on the original processor?

 

1.14 Assume a program requires the execution of 60 X 10^6 FP instructions, 100 x 10^6 INT instructions, 80 X 10^6 L/S instructions (load and store instructions), and 16 X 10^6 branch instructions. The CPI for each type of instruction is 2, 1, 3, and 4, respectively. Assume that the processor has a 2 GHz clock rate.

  1. By how much must we improve the CPI of FP instructions if we want the program to run two times faster?
  2. By how much must we improve the CPI of L/S instructions if we want the program to run two times faster?
  3. By how much is the execution time of the program improved if the CPI of INT and FP instructions is reduced by 30% and the CPI of L/S and Branch is reduced by 40%?

 

1.16  Convert the following binary numbers to decimal numbers, show the steps of your work.

  1. a) 1110,  b) 100100,   c) 11010111, d) 011101010100100

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?