You are on page 1of 2

COMP108 Introduction to Computer Architecture

Department
Program Name

Semester
Date

: Faculty of Information & Communication Technology


: INT, Associate Degree in Information Technology
BSIT, BSc (Hons) in Information Technology
BSBT, BSc (Hons) in Business Information Technology
INT, Associate Degree in Information Technology
BSIT, BSc (Hons) in Information Technology
INT, Associate Degree in Information Technology
BSIT, BSc (Hons) in Information Technology
Tutorial 1
: 2
Chapter
I
: 3rd, March 2014

1. Consider having a program that runs in 50s on computer A, which has a 500MHz clock.
We would like to run the same program on another machine, B, in 20s. If machine B requires
2.5 times as many clock cycles as machine A for the same program, what clock rate must
machine B have in MHz?
2. Suppose that we have two implementations of the same instruction set architecture.
Machine A has a clock cycle time of 50ns and a CPI of 4.0 for some program, and machine B
has a clock cycle of 65ns and a CPI of 2.5 for the same program. Which machine is faster and
by how much?
3. A compiler designer is trying to decide between two code sequences for a particular
machine. The hardware designers have supplied the following facts:
Instruction
class
A
B
C

CPI of the
instruction class
1
3
4

For a particular high-level language, the compiler writer is considering two sequences that
require the following instruction counts:
Instruction
class
1
2

Instruction count
(in millions)
A
B
C
2
1
2
4
3
1

What is the CPI for each sequence? Which code sequence is faster ? By how much?

4. Consider a machine with three instruction classes and CPI measurements as follows:

Page 1 of 2

Instruction
class
A
B
C

CPI of the
instruction class
2
5
7

Suppose that we measured the code for a given program in two different compilers and
obtained the following data :
Code Sequence
Instruction count
(in millions)
A
B
C
Compiler 1
15
5
3
Compiler 2
25
2
2
Assume that the machines clock rate is 500MHz. Which code sequence will execute faster
according to MIPS? And according to execution time?
5. Three enhancements with the following speedups are proposed for a new machin e:
Speedup (a) = 30, Speedup (b) = 20, and Speedup (c) =15. Assume that for some set of
programs, the fraction of use is 25% for enhancement (a), 30% for enhancement (b), and 45%
for enhancement (c). If only one enhancement can be implemented, which should be chosen
to maximize the speedup? If two enhancements can be implemented , which should be
chosen, to maximize the speed up?
6. A benchmark program is run on a 40MHz processor. The object code consists of 100,000
instructions with the following instruction mix and clock cycle count :
Instruction
Instruction
Clock Cycle
Type
Count
Count
Integer Arithmetic
45000
1
Data Transfer
32000
2
Floating Point
15000
2
Control Transter
8000
2
Determine the effective CPI, MIPS rate and time for this progam.

Page 2 of 2

You might also like