Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(a) Find out the total numbers of clock cycles used for each code sequence. (b) Find out the average CPI for each code sequence. (c)
(a) Find out the total numbers of clock cycles used for each code sequence.
(b) Find out the average CPI for each code sequence.
(c) Find out the execution time considering that the CPU is a 400 MHz machine. (Assume all the CPU time is dedicated to executing these instructions) Which code will give better performance?
A designer has to optimize the performance of a compiler on a given machine. The hardware designers provide the following documentation Instruction class CPI for this class of instruction 10 12 15 30 The compiler designer has to decide between two different code sequences for a certain high level statement. The table below gives the number of times each instruction class is used in each code sequence Code sequence Instruction counts for instruction class Code 1 Code 2 6Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started