100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Questions_and_answers_in_Computer_Arch_a $16.99   Add to cart

Exam (elaborations)

Questions_and_answers_in_Computer_Arch_a

 3 views  0 purchase
  • Course
  • Computer_Arch_a
  • Institution
  • Computer_Arch_a

Chapter 1 Quiz Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 80 MHz and M2 has a clock rate of 100 MHz. The average number of cycles for each instruction clas...

[Show more]

Preview 2 out of 5  pages

  • August 4, 2024
  • 5
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • Computer_Arch_a
  • Computer_Arch_a
avatar-seller
StudyCenter1
Chapter 1 Quiz

Consider two different implementations, M1 and M2, of the same instruction set. There are three
classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 80 MHz and
M2 has a clock rate of 100 MHz. The average number of cycles for each instruction class and
their frequencies (for a typical program) are as follows:




(a) Calculate the average CPI for each machine, M1, and M2.

For Machine M1:
Clocks per Instruction = (60/100)* 1 + (30/100)*2 + (10/100)*4
= 1.6
For Machine M2:
Clocks per Instruction = (60/100)*2 + (30/100)*3 + (10/100)*4
= 2.5

(b) Calculate the average MIPS ratings for each machine, M1 and M2.

For Machine M1:
Average MIPS rating = Clock Rate/(CPI * 106)
= (80 * 106) / (1.6*106)
= 50.0
For Machine M2:
Average MIPS rating = Clock Rate/(CPI * 106)
= (100 * 106) / (2.5*106)
= 40.0

(c) Which machine has a smaller MIPS rating ? Which individual instruction class CPI do you
need to change, and by how much, to have this machine have the same or better performance as
the machine with the higher MIPS rating (you can only change the CPI for one of the instruction
classes on the slower machine)?
Machine M2 has a smaller MIPS rating. If we change the CPI of instruction class A for Machine
M2 to 1, we can have a better MIPS rating than M1 as follows:
Clocks per Instruction = (60/100)*1 + (30/100)*3 + (10/100)*4 = 1.9
Average MIPS rating = Clock Rate/(CPI * 106) = (100 * 106) / (1.9*106) = 52.6

, 2. Suppose you have a machine which executes a program consisting of 50% floating point
multiply, 20% floating point divide, and the remaining 30% are from other instructions.

(a) Management wants the machine to run 4 times faster. You can make the divide run at most 3
times faster and the multiply run at most 8 times faster. Can you meet management’s goal by
making only one improvement, and which one?

Amdahl’s Law states:
Execution time after improvement =
(Execution time affected by improvement)/(Amount of Improvement) +
Execution time unaffected
Assuming initially that the floating point multiply, floating point divide and the other instructions
had
the same CPI,
Execution time after Improvement with Divide = (20)/3 + (50 + 30) = 86.67
Execution time after Improvement with Multiply = (50)/8 + (20 + 30) = 66.67
The management’s goal can be met by making the improvement with Multiply alone

3. Suppose that we can improve the floating point instruction performance of machine by a
factor of 15 (the same floating point instructions run 15 times faster on this new machine). What
percent of the instructions must be floating point to achieve a Speedup of at least 4?

We will use Amdahl’s Law again for this question.
Let x be percentage of floating point instructions. Since the speedup is 4, if the original program
executed in 100 cycles, the new program runs in 100/4 = 25 cycles.
(100)/4 = (x)/15 + (100 – x)
Solving for x, we get:
x = 80.36

The percent of floating point instructions need to be 80.36.

4. Computer A has an overall CPI of 1.3 and can be run at a clock rate of 600MHz.
Computer B has a CPI of 2.5 and can be run at a clock rate of 750 Mhz. We have a particular
program we wish to run. When compiled for computer A, this program has exactly 100,000
instructions. How many instructions would the program need to have when compiled for
Computer B, in order for the two computers to have exactly the same execution time for this
program

(CPUTime)A = (Instruction count)A * (CPI)A * (Clock cycle Time)A
= (100,000)*(1.3)/(600*106) ns
(CPUTime)B = (Instruction count)B * (CPI)B * (Clock cycle Time)B
= (I)B*(2.5)/(750*106) ns
Since (CPUTime)A = (CPUTime)B,
we have to solve for (I)B and get 65000

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller StudyCenter1. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $16.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

81113 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$16.99
  • (0)
  Add to cart