Você está na página 1de 2

KT14203- Computer Architecture and Organization

Sekolah Kejuruteraan dan Teknologi Maklumat

Keakitekturan Komputer
Semester 2 2013/2014

Quiz #1

Marked question (20 marks)

Consider two different machines, with two different instruction sets, named as
machine A and B. Machine A has a processor with a clock rate of 200 Mhz, while
Machine B is 250 MHz. The following measurements are recorded on the two
machines running a given set of benchmark program:

Instruction type Instruction count (millions) CPI


Machine A
Arithmetic and 8 1
logic 4 3
Load and store 2 4
Branch 4 3
Others
Machine B
Arithmetic and 10 1
logic 8 2
Load and store 2 4
Branch 4 3
Others

1. Determine the effective CPI, MIPS rate and execution time for each
machine.
(12 marks)
Answer:

2 marks for each CPI, MIPS and time for each machine, thus 2 x 3 x 2 = 12
marks.
KT14203- Computer Architecture and Organization

CPI A
CPI i Ii

8 1 4 3 2 4 4 3 10 6 2.22
Ic 8 4 2 4 10 6
f 200 10 6
MIPS A 90
CPI A 10 6 2.22 10 6
I c CPI A 18 10 6 2.2
CPU A 0.2 s
f 200 10 6

CPI B
CPI i Ii

10 1 8 2 2 4 4 3 10 6 1.92
Ic 10 8 2 4 10 6
f 250 10 6
MIPS B 130.21
CPI B 10 6 1.92 10 6
I c CPI B 24 10 6 1.92
CPU B 0.18 s
f 250 10 6

2. Answer the following questions


a. Which machine is faster? Why? (2 marks)

Answer:

Machine B is faster [1] as it used only 0.18s to complete the


benchmark program while machine A used 0.2 s [1].

b. Based on the machines clock rate, MIPS and CPI values, explain
why Machine B completes the execution of the benchmark
program quicker than Machine A although Machine B has more
instructions than Machine A?
(6 marks)
Answer:
Student must able to relate the clock rate, MIPS and CPI to answer
this question. Sample solution as follows:
Machine Bs CPI is less than Machine A, which means B can
execute more instruction per clock cycle than A [2]. Coupled with
the clock rate, where machine Bs is higher (B has more clock cycle
per second) [2], the MIPS rate is much higher for machine B.
Although the Ic of B is 1/3 more than A, B is capable of executing
45% instructions more than A [2] per second. Hence, B can
complete the execution only in 0.18s while A in 0.2 s.

Você também pode gostar