Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
com
fb.com/groups/yes.yu
2.
3.
Program
Program 1
Program 2
os
a
Use the following tables and information for answering questions 4-8:
m
a
1.
# instructions
load
store
branch
400
100
50
300
100
100
compute
1
load
10
store
10
total
1550
2000
branch
3
Instruction
# cycles
compute
1000
1500
Assume we want to run Program 1 and program 2 on the processor with 3 GHz.
ee
sa
4.
5.
6.
2|6
yes.yarmouky.com
fb.com/groups/yes.yu
8.
What is the speedup achieved for executing Program 1 if the number of load instruction can be reduced by one half?
a. 1.49
b. 0.67
c. 2.0
d. 0.5
e. 1.35
What is the geometric mean of the different instruction classes?
a. 6
b. 4.9
c. 24
d. 17.3
e. 4.16
m
a
7.
The following table shows the manufacturing data for a processor. Use it for answering questions 9-10:
Wafer diameter
25 cm
os
a
9.
ee
The following table shows the SPECpower_ssj2008 running on a certain server. Use it for answering question 11.
sa
Target load %
100 %
90 %
80 %
70 %
60 %
50 %
40 %
30 %
20 %
10 %
0%
Performance (ops/s)
110,256
101,204
89,597
79,068
67,865
56,959
45,280
34,551
23,814
12,066
0
3|6
yes.yarmouky.com
fb.com/groups/yes.yu
Consider the program in the following table running on a processor with clock rate = 3 GHz. Use it for answering questions
12-13:
Instr. Count
6
10
L/S instr.
50%
FP inst.
40%
Branch instr.
10%
CPI(L/S)
0.75
CPI(FP)
1.0
CPI(Branch)
1.5
os
a
m
a
ee
a. $rs = $10
b. $rt = $10
c. $rd = $16
d. shamt = 00001two
e. funct = 000000two
15. The following sequence of MIPS instructions
slt $at, $t5, $t3
beq $at, $zero, L
is equivalent to which pseudoinstruction?
sa
4|6
yes.yarmouky.com
fb.com/groups/yes.yu
sa
ee
os
a
m
a
5|6
yes.yarmouky.com
fb.com/groups/yes.yu
sa
ee
os
a
m
a
24. Suppose that $t7 initially holds the value 3. What is the value stored in $t7 after executing the following statement?
sll $t6, $t7, 4
a. 3
b. 6
c. 12
d. 24
e. 48
25. The following program tries to copy words from the address in register $a0 to the address in register $a1, counting
the number of words copied in register $v0. The program stops copying when it finds a word equal to 0. You do not
have to preserve the contents of registers $v1, $a0, and $a1. This terminating word should be copied but not
counted.
addi $v0, $zero, -1
loop: lw, $v1, 0($a0)
addi $v0, $v0, 1
sw $v1, 0($a1)
addi $a1, $a1, 4
bne $v1, $zero, loop
which of the following actions will turn the above code into a bug-free version?
a. addi $v0, $zero, -1 must be replaced by addi $v0, $zero, 0
b. addi $a0, $a0, 4 must be inserted between sw and addi instructions
c. addi $v0, $v0, 1 must be replaced by addi $v0, $v0, 4
d. bne $v1, $zero, loop must be replaced by beq $v1, $zero, loop
e. The above code is already bug-free
6|6
yes.yarmouky.com
fb.com/groups/yes.yu