Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribed

(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 6

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions