05.08.2014 Views

Lecture Notes for Computer Architecture II - St. Cloud State University

Lecture Notes for Computer Architecture II - St. Cloud State University

Lecture Notes for Computer Architecture II - St. Cloud State University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Question 4<br />

Assuming the CPI <strong>for</strong> program 2 on each machine in Question 2.1 is the same as the<br />

CPI <strong>for</strong> program 1 found in Question 2.3, find the instruction count <strong>for</strong> program 2<br />

running on each machine using the execution times from Question 2.1.<br />

Progra<br />

m<br />

Time on<br />

M1<br />

Time on<br />

M2<br />

1 10 seconds 5 seconds<br />

2 3 seconds 4 seconds<br />

Page | 123<br />

Given number of cycles per second & number of seconds can calculate number of<br />

required cycles <strong>for</strong> each machine, then divide by CPI to get number of instruction.<br />

Solution<br />

Instructions per program<br />

M1 3*200*10 9<br />

10<br />

Instructions per program<br />

M2 4*300*10 9<br />

9.4<br />

Question 5<br />

From 2.4<br />

M1 = 60 GIPS<br />

M2 = 127GIPS<br />

M2 is twice as fast as M1<br />

Does not cost twice<br />

Question 6<br />

Suppose you had many more machines to consider besides M1 and M2 described in<br />

Questions 2.1 and 2.5 (each with a cost and an execution time <strong>for</strong> program 1, which you<br />

need to run a large number of times). Could you use the cost divided by the execution<br />

time as a metric to help you in your purchasing decision? How about the cost multiplied<br />

by the execution time?<br />

a. Cost * Execution time<br />

b. Cost/Execution time<br />

Solution<br />

Use (a) Cost * Execution time<br />

10,000*10 = 100,000<br />

15,000*5 = 75,000<br />

Cost/Execution time = cost * per<strong>for</strong>mance. Need per<strong>for</strong>mance <strong>for</strong> dollar value.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!