Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. In this exercise, you will evaluate the performance difference between two CPU architectures, CISC (Complex Instruction Set Computing) and RISC (Reduced Instruction Set Computing).

image text in transcribed

1. In this exercise, you will evaluate the performance difference between two CPU architectures, CISC (Complex Instruction Set Computing) and RISC (Reduced Instruction Set Computing). Generally speaking, CISC CPUs have more complex instructions than RISC CPUs and therefore need fewer instructions to perform the same tasks. However, typically one CISC instruction, since it is more complex, takes more time to complete than a RISc instruction. Assume that a certain task needs P CISC instructions and 2P RISC instructions, and that one CISC instruction takes 87 ns to complete, and one RISC instruction takes 2T ns Under this assumption, which one has the better performance? 2. Sometimes softwa re optimization can dramatically improve the performance of a computer can perform a multiplication operation in 10 ns, and a system. Assume that a CPU subtraction operation in I ns. How long will it take for the CPU to calculate the result of d- a b-a c? Could you optimize the equation so that t will take less time? Write the MIPS assembly code that creates the 32-bit constant 0010 0000 0000 0001 0100 1001 0010 0100two and stores that value to register $ti. 3. Function can often be implemented by compilers "in-line". An in-line function is when the body of the function is copied into the program space, allowing the overhead of the function call to be eliminated. Implement an "in-line" version of the C code above in MIPS assembly. What is the reduction in the total number of MIPS assembly instructions needed to complete the function? Assume that the C variable n is initialized to 5. The function is shown below. 4. Int fib(int n) if (n-0 else if (n--1) else return 0; return 1; return fib(n-1) + fib(n-2)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

Create and use video Translate ideas into visuals

Answered: 1 week ago