CSCI 370 Computer Architecture: Homework 1

Due date: On or before Monday, February 12, 2024
Absolutely no copying others’ works
Name: ___________________________

  1. Consider two different processors P1 and P2 executing the same instruction set with the clock rates and CPIs given in the following table:

    Processor Clock Rate CPI
    P1 2.5 GHz 2.0
    P2 2.0 GHz 1.5

    1. (15%) Which processor has the higher performance expressed in instructions per second?
      Ans>
      • Instructions/secondP1 =



      • Instructions/secondP2 =



      The higher performance:


    2. (20%) If the processors each execute a program in 15 seconds, find the number of cycles and the number of instructions.
      Ans>
      • # of instructionsP1 =



      • # of instructionsP2 =



      • # of clock cyclesP1 =



      • # of clock cyclesP2 =





    3. (20%) We are trying to reduce the execution time (15 seconds) by 15% but this leads to an increase of 10% in the CPI. What clock rate should we have to get this time reduction?
      Ans>
      • Clock rateP1 =




      • Clock rateP2 =





  2. Compilers can have a profound impact on the performance of an application. Consider the following two compilers for a program:

    Compiler A Compiler B
    Instruction count Execution time Instruction count Execution time
    2.0×109 2.0 s 1.0×109 2.5 s

    1. (15%) Find the average CPI for each program given that the processor has a clock cycle time of 2 ns (or 2×10-9 s).
      Ans>
      • Average CPIA =




      • Average CPIB =






    2. (15%) 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?
      Ans>
           Clock rateA / Clock rateB (or Clock cycle timeB / Clock cycle timeA)
        =






    3. (15%) A new compiler is developed that uses 4.5×108 instructions and has an average CPI of 3.0. What is the speedup of using this new compiler versus using Compiler A on the original processor?
      Hint: The speedup here is equal to TA/Tn where
      • TA: the execution time by using the A compiler and
      • Tn: the execution time by using the new compiler.
      Ans>
           TA/Tn
        =