Processor Performance Analysis: Frame Buffer, Clock Rates, and Compilers

Frame Buffer and Network Transmission

Consider a color display using 8 bits for each of the primary colors (R, G, B) per pixel and a frame size of 1280×1024.

  1. Minimum Frame Buffer Size: The frame size is 1280 * 1024 = 1,310,720 pixels. With 3 bytes per pixel (one for each color), the minimum frame buffer size is 1,310,720 * 3 = 3,932,160 bytes.
  2. Transmission Time: The transmission time over a 100 Mbit/s network is (3,932,160 * 8 bits) / (100 * 106 bits/second) = 0.3145728 seconds, or 315 ms.

Processor Performance Comparison

Three processors, P1, P2, and P3, execute the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz clock rate and a CPI of 1.0. P3 has a 4.0 GHz clock rate and a CPI of 2.2.

  1. Instructions Per Second:
    • P1: (3 * 109) / 1.5 = 2.0 * 109 instructions/second
    • P2: (2.5 * 109) / 1.0 = 2.5 * 109 instructions/second
    • P3: (4 * 109) / 2.2 = 1.818 * 109 instructions/second
  2. Cycles and Instructions in 10 Seconds:
    • P1: Cycles = 10 * 3 * 109 = 30 * 109; Instructions = (30 * 109) / 1.5 = 20 * 109
    • P2: Cycles = 10 * 2.5 * 109 = 25 * 109; Instructions = (25 * 109) / 1.0 = 25 * 109
    • P3: Cycles = 10 * 4 * 109 = 40 * 109; Instructions = (40 * 109) / 2.2 = 18.18 * 109
  3. Clock Rate for 30% Execution Time Reduction with 20% CPI Increase:
    • New execution time = 70% * 10 seconds = 7 seconds
    • New CPI (P1) = 1.5 * 1.20 = 1.8
    • New CPI (P2) = 1.0 * 1.20 = 1.2
    • New CPI (P3) = 2.2 * 1.20 = 2.64
    • New clock rate (P1) = (20 * 109 * 1.8) / 7 = 5.143 * 109 = 5.145 GHz
    • New clock rate (P2) = (25 * 109 * 1.2) / 7 = 4.286 * 109 = 4.286 GHz
    • New clock rate (P3) = (18.18 * 109 * 2.64) / 7 = 6.856 * 109 = 6.856 GHz

Processor Performance with Instruction Classes

Two processors, P1 and P2, have different CPIs for instruction classes A, B, C, and D. P1 has a 2.5 GHz clock rate and CPIs of 1, 2, 3, and 3, respectively. P2 has a 3 GHz clock rate and CPIs of 2, 2, 2, and 2, respectively. A program executes 1 million (106) instructions with 10% class A, 20% class B, 50% class C, and 20% class D.

Instruction Counts:

  • Class A: 10% * 106 = 105 instructions
  • Class B: 20% * 106 = 2 * 105 instructions
  • Class C: 50% * 106 = 5 * 105 instructions
  • Class D: 20% * 106 = 2 * 105 instructions

Execution Time:

  • P1: Execution time = (105 * 1 + 2 * 105 * 2 + 5 * 105 * 3 + 2 * 105 * 3) / (2.5 * 109) = 10.4 * 10-4 seconds = 1040 μs
  • P2: Execution time = (105 * 2 + 2 * 105 * 2 + 5 * 105 * 2 + 2 * 105 * 2) / (3 * 109) = 6.667 * 10-4 seconds = 667 μs

Compiler Impact on Performance

Compiler A results in 1.0E9 instructions and 1.1 s execution time. Compiler B results in 1.2E9 instructions and 1.5 s execution time. The processor has a 1 ns clock cycle time.

Average CPI:

  • Compiler A: CPI = 1.1 / (1.0E9 * 1.0E-9) = 1.1
  • Compiler B: CPI = 1.5 / (1.2E9 * 1.0E-9) = 1.25

Clock Speed Comparison: If execution times are the same on two different processors, the clock rate ratio is (1.2E9 * 1.25) / (1.0E9 * 1.1) = 1.36.

New Compiler Speedup: A new compiler uses 6.0E8 instructions with an average CPI of 1.1.

  • Speedup vs. Compiler A: (1.0E9 * 1.1) / (6.0E8 * 1.1) = 1.67
  • Speedup vs. Compiler B: (1.2E9 * 1.25) / (6.0E8 * 1.1) = 2.27