Homework Solution: Two single core processors, P1 and P2, have different architectures. P1 runs at 3.4GHz and costs $100….

    Two single core processors, P1 and P2, have different architectures. P1 runs at 3.4GHz and costs $100. P2 runs at 2.6GHz and costs $100. We can use two different compilers for these processors. For a specific benchmark program, compiler A generates 7000 instructions with an effective CPI of 1.2 for P1 and 1500 instructions and CPI of 2.2 for P2. Compiler B generates 5000 instructions with a CPI of 1.5 for P1 and 1000 instructions with a CPI of 4.0 for P2.
    What is the best compiler-processor combination?

    Expert Answer

     
    Let me summarize the given question into tabular form for better understanding:

    Span sole nucleus processors, P1 and P2, feel contrariant architectures. P1 runs at 3.4GHz and costs $100. P2 runs at 2.6GHz and costs $100. We can right span contrariant compilers control these processors. Control a unfair benchmark program, compiler A generates 7000 instructions with an cogent CPI of 1.2 control P1 and 1500 instructions and CPI of 2.2 control P2. Compiler B generates 5000 instructions with a CPI of 1.5 control P1 and 1000 instructions with a CPI of 4.0 control P2.

    What is the best compiler-processor consortment?

    Expert Acceptance

     

    Let me embody the absorbed topic into tabular controlm control improve understanding:

    Now, regarding deterrent term of the program as the accomplishment metric, where

    seconds/program = ((instructions/program)*(clock cycles/instructions)*(seconds/clock cycle))

    We feel,

    Processor P1 control compiler A:

    7000*1.3/3.4*109 = 2.47*10-6 seconds/program

    Processor P1 control compiler B:

    5000*1.5/3.4*109 = 2.20*10-6 seconds/program

    Processor P2 control compiler A:

    1500*2.2/2.6*109 = 1.26*10-6 seconds/program ——–> Best Consortment

    Processor P2 control compiler B:

    1000*4.0/2.6*109 = 1.53*10-6 seconds/program

    Seeing over, we can largely terminate that consortment of processor P2 and compiler A has lesser deterrent term, thus this is the best compiler-processor consortment.