0% found this document useful (0 votes)
97 views2 pages

Computer Science 321

This document contains the instructions for homework 2 that is due on February 6th. It includes 4 problems related to benchmarking programs on different computer systems and analyzing their performance based on instruction mix and clock cycles. The problems involve calculating relative instruction frequencies, CPI, and determining which system is faster based on clock rate differences.

Uploaded by

Marc Isaac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views2 pages

Computer Science 321

This document contains the instructions for homework 2 that is due on February 6th. It includes 4 problems related to benchmarking programs on different computer systems and analyzing their performance based on instruction mix and clock cycles. The problems involve calculating relative instruction frequencies, CPI, and determining which system is faster based on clock rate differences.

Uploaded by

Marc Isaac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Com S 321 Homework 2 Due: Wednesday, Feb.

6, by Midnight
Spring 2019

1. (10 points) For the purpose of solving a given application problem, you benchmark a program
on two computer systems. On system A, the object code executed 30 million Arithmetic Logic
Unit operations (ALU ops), 75 million load instructions, and 45 million branch instructions. On
system B, the object code executed 30 million ALU ops, 60 million loads, and 30 million branch
instructions. In both systems, assume that each ALU op takes 1 clock cycles, each load takes 2
clock cycles, and each branch takes 4 clock cycles.

(a) Compute the relative frequency of occurrence of each type of instruction executed in both
systems. Show all your work.
(b) Find the CPI for each system. Show all your work.
(c) Assuming that the clock rate on system A is 20% faster than the clock rate on system B, which
system is faster for the given application problem and by how much percent? Justify your answer
quantitatively. Show all your work. (Note: a system with a faster clock rate produces a smaller
clock cycle time.)

2. (10 points) For the purpose of solving a given application problem, you benchmark a program
on two computer systems. On system A, the object code executed 20 million Arithmetic Logic
Unit operations (ALU ops), 40 million load instructions, and 30 million branch instructions. On
system B, the object code executed 25 million ALU ops, 50 million loads, and 20 million branch
instructions. In both systems, each ALU op takes 2 clock cycles, each load takes 4 clock cycles,
and each branch takes 6 clock cycles.
(a) Compute the relative frequency of occurrence of each type of instruction executed in both
systems. Show all your work.
(b) Find the CPI for each system. Show all your work.
(c) Assuming that the clock cycle rate on system B is 15% faster than the clock rate on system A,
which system is faster for the given application problem and by how much percent? Justify your
answer quantitatively and show all your work.

3. (10 points) Suppose you have a load-store computer with the following instruction mix:

Operation Frequency Number of clock cycles

ALU ops 40 % 2
Loads 20 % 4
Stores 18 % 4
Branches 22 % 6

The ALU ops (arithmetic logic unit ops) typically use operands in CPU registers and hence they
take fewer clock cycles to execute. However, if you want to add a memory operand to a CPU
register, then you would have to explicitly load it into a CPU register. For such ALU operations,
you would say that they are paired with a load instruction since the value moved from memory
would be used only for the particular ALU operation and not used anywhere else. We observe
that 30% of the ALU ops are paired with a load (i.e., they occur together), and we propose to
replace these ALU ops and their loads with a NEW instruction. Assume that this NEW
instruction takes 4 clock cycles. However, with the NEW instruction added, branches will take 8
clock cycles rather than 6. Assuming that the clock rate is unchanged, would this change improve
performance? Justify your answer quantitatively by comparing expressions for CPU Execution
time. Show all your work. Do not do any rounding when you compute the frequency of the NEW
instructions.

4. (10 points) Suppose you have a load/store computer as described above with the
following instruction mix:

Operation Frequency No. of Clock cycles

ALU ops 35% 1


Loads 25% 2
Stores 15% 2
Branches 25% 3

(a) Compute the CPI. Show all your work.

(b) We observe that 25% of the ALU ops are paired with a load, and we propose to
replace these ALU ops and their loads with a NEW instruction. The NEW instruction
takes 1 clock cycle. With the NEW instruction added, branches take 5 clock cycles.
Compute the CPI for the new version. Show all your work. Do not do any rounding when
you compute the frequency of the NEW instructions.

(c) If the clock rate for the new version is 30% faster than the old version, which version
is faster and by what percent? Justify your answer quantitatively by comparing
expressions for CPU Execution time. Show all your work.

You might also like