Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

When counting the number of cycles for a loop, find out when (in which cycle) the first instruction in the loop is fetched and when

When counting the number of cycles for a loop, find out when (in which cycle) the first instruction in the loop is fetched and when it is fetched again (assuming the loop repeats), and then calculate the difference of cycle numbers. The difference is the number of cycles an iteration takes. For example, if the first instruction in a loop is fetched in cycle 1 and fetched again in cycle 11, each iteration takes 10 cycles.

image text in transcribed

2. (10 points) Control hazards. Suppose the branch frequencies (as percentages of all instructions) are as follows: 1%. 15%, and 60% of the conditional branches are taken. Jumps (and calls): Conditional branches: Suppose a pipeline has four stages, each stage taking one cycle. The first pipeline stage can always be done independent of whether the branch (or jump) goes. The target addresses is available at the end the second stage for both jumps and conditional branches. Conditional branches need one more cycle to calculate their condition in the third stage Ignore other pipeline stalls and assume branches are predicted taken. How much faster would the processor be without any control hazards

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_2

Step: 3

blur-text-image_3

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

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions