Aca Homework1

Submitted by: Submitted by

Views: 176

Words: 759

Pages: 4

Category: Science and Technology

Date Submitted: 09/22/2013 04:16 PM

Report This Essay

Homework # 1

Performance Equation

1. A program runs in 10 seconds on Computer A which runs at 2 GHz. The plan is to build a computer B which will run this program in 6 seconds. The designer feels that it is possible to raise the clock frequency but the effect will be to affect the number of clock cycles required adversely (due to the decrease in clock cycle duration). B will require 1.2 times as many clock cycles as computer A. What should be the clock rate for B to run the program in 6 seconds?

Solution: CPU time (A) = CPU clock cycleclock rate (A)

10 seconds = CPU clock cycles of program2×109

CPU clock cycle of program= 10 seconds × 2 × 109 cycles/seconds

To get the clock rate of faster computer, we use the same formula

6 seconds = 1.2 ×CPU clock cycle of programclock rate (B) = 1.2 ×2×109cyclesclock rate (B)

Clock rate (B) = 1.2 ×2×109cycles6 seconds = 4×109 cycles/seconds

2. Computer A has a clock cycle time of 250 ps and a CPI of 2.0 for a program. Computer B has a clock cycle time of 500 ps and a CPI of 1.2 for the same program. Which computer is faster and by how much?

Solution: Each computer is implementing the same program. So, the number of instruction (N) will be identical.

First, finding the number of clock cycles for each computer

CPU clock cyclesA = N instructions × 2.0 cycles/instruction

CPU clock cyclesB = N instructions × 1.2 cycles/instruction

Next, computing the CPU time for each computer

CPU timeA = CPU clock cyclesA × clock cycle timeA

= N × 2.0 × 250ps = 500×N ps

CPU timeB = CPU clock cycleB × Clock Cycle timeB

= N × 1.2 × 500ps = 600×N ps

Hence, computer A takes less time and is faster than By 100 N ps

Amdahl’s Law

1. Exercise 1.16 a and b (p.67)

(a) If the new floating-point unit...