0% found this document useful (0 votes)
146 views4 pages

HW#2

The document discusses the performance improvement of upgrading the CPU in a web server system. It analyzes the speedup achieved based on the original CPU's idle time, computation time, and I/O wait time. It finds that with a 10x faster new CPU, and the same percentages of time for idle, computation and I/O, the overall speedup would be 3.7x. It then examines the performance of two computers - A and B - with different clock speeds and CPI values on two programs. It determines that Computer B is 1.201x faster on Program 1, while Computer A is 1.665x faster on Program 2. Finally, it calculates the CPI, time spent on divides, and

Uploaded by

Muhammad Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views4 pages

HW#2

The document discusses the performance improvement of upgrading the CPU in a web server system. It analyzes the speedup achieved based on the original CPU's idle time, computation time, and I/O wait time. It finds that with a 10x faster new CPU, and the same percentages of time for idle, computation and I/O, the overall speedup would be 3.7x. It then examines the performance of two computers - A and B - with different clock speeds and CPI values on two programs. It determines that Computer B is 1.201x faster on Program 1, while Computer A is 1.665x faster on Program 2. Finally, it calculates the CPI, time spent on divides, and

Uploaded by

Muhammad Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

2.

1 Suppose that we are considering an enhancement to the processor of a server system

used for web serving. The new CPU is 10 times faster on computation in the web serving

application than the original processor. Assuming that the CPU is idle for 20% of time,

does computation for 30% of time and is waiting for I/O for 50% time, what is the overall

speed up in this case?

Step 1 :-( 2.1) for old Processor

             Let CPI when CPU is Idle = 1

             % when CPU is Idle = 20%

Computation = 10 given CPI when the CPU completes

Percent processing when the CPU completes = 30 percent

Enable CPI to I / O = 1 when the Processor is waiting for

50% while the CPU waits for I / O = 50%

-- > Average Old Processor Execution CPI= 0.20 1 + 0.30 10 + 0.50 * 1 = 3.70 CPI

For Improved Processor Now

             Let CPI when CPU is Idle = 1

             % when CPU is Idle = 20%

Computation = 1 given CPI when the CPU finishes

Percent processing when the CPU completes = 30 percent

Enable CPI to I / O = 1 when the Processor is waiting for


50% while the CPU waits for I / O = 50%

-- > Old Processor Average Execution CPI = 0.20 1 + 0.30 1 + 0.50 * 1 = 1 CPI

Speedup = Old Processor execution / New Processor execution = 3.70/1 = 3.70

2.6 Computer A executes the MIPS ISA and has a 2.5 GHz clock frequency. Computer B

executes the x86 and has a 3 GHz clock frequency. On average, programs execute 1.5 times

as many MIPS instructions than x86 instructions. a. For Program P1, Computer A has a

CPI of 2 and Computer B has a CPI of 3. Which computer is faster for P1? What is the

speedup? b. For Program P2, Computer A has a CPI of 1 and Computer B has a CPI of 2.

Which computer is faster for P2? What is the speedup?

Step 2 :- (2.6)

Device the frequency of the clock is= 2.50 GHz

Time clock = 1/2.50 * 10 ^ 9 = 400 Tera seconds

The clock frequency of device B is = 3 GHz

Time clock = 1/3 * 10 ^ 9 = 333Teraseconds

(a) For Program1

CPI of Computer A is 2

CPI of Computer B is 3

Computer A’s average runtime is = 2 * 400 = 800Teraseconds

The average time for machine B to run is = 2 * 333= 666Teraseconds


Computer B is quicker since the time of execution is less than B.

-> Speedup = Computer A/computer B = 800/666 = 1.201

(b) For Program 2

CPI of Computer A is 1

CPI of Computer B is 2

The average machine A runtime is = 400 = 400Teraseconds.

The average time for machine B to run is = 2 * 333= 666Teraseconds

-- > Machine A is faster since the execution time is shorter than A

-> Speedup = Computer B/computer A = 666/400 = 1.665

2.7 A program has 10% divide instructions. All non-divide instructions take one cycle. All

divide instructions take 50 cycles. a. What is the CPI of this program on this processor? b.

What percent of time is spent just doing divides? c. What would the speedup be if we sped

up divide by 2x?

Phase 3:- A programed has instructions for a 10 percent split

And the programed has 90% non-dividing instructions,

One cycle = 1 cycle takes all non-divide instructions

The 50 period of all dividing instructions takes (a) Average of CPI (old) = 0.10* 50 + 0.90* 1 =

5.90CPI

(b) Wasting a percentage of time only doing divisions = 0.10 * 50 = 5CPI 


(c) If the latest processor has a split CPI, it is 50/2 = 25CPI

Now the latest CPI average = 0.10 * 25 + 0.90 * 1 = 3.4CPI

Speedup = CPI old/CPI new = 5.90/3.4 = 1.73

You might also like