Document

advertisement
一、
1. Amdahl’s law (p.267):A rule stating that the performance enhancement possible with a given
improvement is limited by the amount that the improved feature is used.
2. Benchmark (p.254):The programs are specifically chosen to measure performance.
SPEC (p.259):System Performance Evaluation Corporation.
3. CPI (p.248):Average clock cycles per instruction for a program or program fragment.
Clock cycles (p.248):The time for one clock period, usually of the processor clock, this runs at a
constant rate.
Clock Time = Clock period (p.245):The length of each clock cycle.
Clock rate (p.245):The inverse of the clock period.
4. Exception (p.173):An unscheduled event that disrupts program execution. Ex:overflow.
Interrupt (p.173):An exception that comes from outside of the processor.
5. Biased notation (p.170):A notation that represents the most negative value by 00...000two and the
most positive value by 11...11two, with 0 typically having the value 10...00two, thereby biasing the
number such that the number plus the bias has a nonnegative representation.
IEEE754 (p.193):(-1)S × (1+Fraction) × 2(Exponent-Bias)
The exponent bias for single precision is 127, and is 1023 for double precision.
6. Scientific Notation (p.189):A notation that renders numbers with a single digit to the left of the
decimal point.
Normalized (p.189):A number in scientific notation that has no leading 0s.
7. Stored-program Concept (p.49):The idea that instructions and data of many types can be stored in
memory as numbers, leading to the stored program computer.
8. Instruction set:The set of operations supported by the hardware.
Instruction set architecture (p.21):The interface between the hardware and the lowest-level
software.
9. Instruction format (p.61):A form of representation of an instruction composed of fields of binary
numbers.
MIS Addressing mode:請參閱課本 p.101
Alignment Restriction (p.56):A requirement that data be aligned in memory on natural
boundaries.
10 Caller (p.80):The program that investigates a procedure and provides the necessary parameter
values.
Callee (p.80):A procedure that executes a series of stored instructions based on parameters
provided by the caller and then returns control to the caller.
Jump-and-link Instruction (p.79):An instruction that jumps to a address and simultaneously save
the address of the following instruction in a register.
二、
1. (1) 011
010
001
000
100
101
110
111
2.
+3 (2)011
+2
010
+1
001
+0
000
-0
111
-1
110
-2
101
-3
111
+3
+2
+1
+0
-0
-1
-2
-3
(3)011 +3
010 +2
001 +1
000 0
111 -1
110 -2
101 -3
100 -4
(4)111
110
101
100
011
010
001
000
3
2
1
0
-1
-2
-3
-4
(1) Sign and magnitude & one’s complement 比較具 balance.
(2) 2、2、1、1
(3) Two’s complement. Because positive two’s complement numbers really have an infinite
number of 0s on the left and those that are negative two’s complement numbers have an infinite
number of 1s.
(4) biased 最易 sorting,其他要先判斷 sign bit.
三、
1.
Single precision:(-1)S × (1 + F) × 2(E - 127)
Double precision:(-1)S × (1 + F) × 2(E - 1023)
2.
0.75ten = 2-1 + 4-1 = 0.11two = (1.1)two × 2-1 => exponent = -1+127 = 126
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-0.4ten = -0.0110011001100110......two = (-1) × 1.100110011001……two× 2-2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 1 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
3.
(-1)0 × (1.01)two × 2(129-127) = 1.01two ×22 = 5ten
四、(p.145)
1、2. (1) Regularity favors simplicity. Regularity motivates many features of the MIPS instruction set:
keeping all instruction a single size.
(2) Smaller is faster. MIPS has 32 registers rather than many more.
(3) Make common case faster. Examples of making the common MIPS case fast include
PC-relative addressing for conditional braches and immediate addressing for constant operands.
(4) Good design demands good compromises. One MIPS example was the compromise
between providing for larger addresses and constants in instructions and keeping all instructions
the same length.
3. Make common case faster
五、
1. m/s + L/R
2. m/s + L/R+ t
3. m/s + 2L/R+ t/2
Download