1Solutions
Solution 1.1
1.1.1 Computer used to run large problems and usually accessed via a network: 5 supercomputers
1.1.2 1015
or 2
50
bytes: 7 petabyte
1.1.3 Computer composed of hundreds to thousands of processors and terabytes of memory: 3 servers
1.1.4 Today’s science fiction application that probably will be available in near
future: 1 virtual worlds
1.1.5 A kind of memory called random access memory: 12 RAM
1.1.6 Part of a computer called central processor unit: 13 CPU
1.1.7 Thousands of processors forming a large cluster: 8 datacenters
1.1.8 A microprocessor containing several processors in the same chip: 10 multi-core processors
1.1.9 Desktop computer without screen or keyboard usually accessed via a net-work: 4 low-end servers
1.1.10 Currently the largest class of computer that runs one application or one set of related applications: 9 embedded computers
1.1.11 Special language used to describe hardware components: 11 VHDL
1.1.12 Personal computer delivering good performance to single users at low cost: 2 desktop computers
1.1.13 Program that translates statements in high-level language to assembly
l anguage: 15 compiler
S2 Chapter 1 Solutions
1.1.14 Program that translates symbolic instructions to binary instructions:
21 assembler
1.1.15 High-level language for business data processing: 25 cobol
1.1.16 Binary language that the processor can understand: 19 machine language
1.1.17 Commands that the processors understand: 17 instruction
c computation: 26 fortran
1.1.18 High-level language for scientifi
1.1.19 Symbolic representation of machine instructions: 18 assembly language
1.1.20 Interface between user’s program and hardware providing a variety of
s ervices and supervision functions: 14 operating system
1.1.21 Software/programs developed by the users: 24 application software
1.1.22 Binary digit (value 0 or 1): 16 bit
1.1.23 Software layer between the application software and the hardware that
includes the operating system and the compilers: 23 system software
1.1.24 High-level language used to write application and system software: 20 C
1.1.25 Portable language composed of words and algebraic expressions that
must be translated into assembly language before run in a computer: 22 high-level
l anguage
1.1.26 1012 or 240 bytes: 6 terabyte
Solution 1.2
4 bytes/pixel. 1280 × 800 pixels= 1,024,000
1,024,000
24 bits/pixel= 4 bytes/pixel. 1280
1.2.1 8 bits × 3 colors= 24 bits/pixel
4 Mbytes).
4,096,000 bytes (approx 4 Mbytes).
pixels. 1,024,000 pixels ×× 4 bytes/pixel= 4,096,000 bytes (approx
500 frames.
2000 Mbytes/4 Mbytes= 500 frames.
1.2.2 2 GB= 2000 Mbytes. No. frames
2000 Mbytes. No. frames= 2000 Mbytes/4 Mbytes
125 Mbytes/
1.2.3 Network speed: 1 gigabit network==> 1 gigabit/per second= 125 Mbytes/
0.256/125=
second. File size: 256 Kbytes= 0.256 Mbytes. Time for 0.256 Mbytes
0.256 Mbytes. Time for 0.256 Mbytes= 0.256/125
2.048 ms.
Chapter 1 Solutions S3
1.2.4 2 microseconds from cache ==> 20 microseconds from DRAM. 20 micro-seconds from DRAM ==> 2 seconds from magnetic disk. 20 microseconds from
DRAM ==> 2 ms from fl ash memory.
Solution 1.3
1.3.1 P2 has the highest performance
performance of P1 (instructions/sec) = 2 2 × 109/1.5 = 1.33 1.33 × 109performance of P2 (instructions/sec) = 1.5 1.5 × 109/1.0 = 1.5 1.5 × 109performance of P3 (instructions/sec) =
3 3 × 109/2.5 = 1.2 1.2 × 1091.3.2 No. cycles =
t ime time × clock rate cycles(P1) = 10 10 × 2 × 109 = 20 20 × 109 s
cycles(P2) = 10 10 × 1.5 × 109 = 15 15 × 109 s
计算机软件的组成cycles(P3) = 10 10 × 3 × 109 = 30 30 × 109 s
time = (No. (No. instr. × × CPI)/clock rate, then No. instructions
= N o. No. cycles/CPI instructions(P1) = 20 20 × 109/1.5 = 13.33 13.33 × 109
instructions(P2) = 15 15 × 109/1 = 15 15 × 109
instructions(P3) = 30 30 × 109/2.5 = 12 12 × 109
1.3.3 time new =
t ime time old × 0.7 = 7 7 s CPI = C PI CPI × 1.2, then CPI(P1) = 1.8, 1.8, CPI(P2) = 1.2, 1.2, CPI(P3) =
3ƒ = N o. No. instr. × × CPI/time, then
ƒ(P1) = 13.33 13.33 × 109 × 1.8/7 = 3.42 3.42 GHz ƒ(P2) = 15 15 × 109 × 1.2/7 =
2.57 2.57 GHz ƒ(P3) = 12 12 × 109 × 3/7 =
5.14 5.14 GHz 1.3.4 IPC = 1/CPI 1/CPI = N o. No. instr./(time × × clock rate)
IPC(P1) = 1.42
1.42IPC(P2) = 2
IPC(P3) = 3.33
3.331.3.5 Time new /Time old = 7/107/10 = 0.7. 0.7. So ƒnew = ƒold /0.7 = 1.5 1.5 GHz/0.7 =
2.14 2.14 GHz.1.
3.6 Time new /Time old = 9/109/10 = 0.9.
0.9.So Instructions new =
I nstructions Instructions old × 0.9 = 30 30 × 109 × 0.9 = 27 27 × 109.
S4Chapter 1 Solutions
Solution 1.4
1.4.1 P2
Class A: 105instr.
Class B: 2 × 105instr.
Class C: 5 × 105instr.
Class D: 2 × 105instr.
No. instr. ×× CPI/clock rate
Time= N o.
0.66 × 10−4
P1: Time class A= 0.66
2.66 × 10−4
Time class B= 2.66
Time class C= 10
10 × 10−4
5.33 × 10−4
Time class D= 5.33
18.65 × 10−4
Total time P1= 18.65
P2:Time class A= 1010−4
Time class B= 22 × 10−4
Time class C= 55 × 10−4
Time class D= 33 × 10−4
11 × 10−4
Total time P2= 11
time × clock rate/No. instr.
1.4.2 CPI= t ime
18.65 × 10−4× 1.5 × 109/106= 2.79
CPI(P1)= 18.65
2.79
11 × 10−4× 2 × 109/106= 2.2
CPI(P2)= 11
2.2
1.4.3
28 × 105
clock cycles(P1)= 10105× 1 +2 ×× 105× 2 +5 ×× 105× 3 +2 ×× 105× 4= 28
22 × 105
clock cycles(P2)= 10105× 2 +2 ×× 105× 2 +5 ×× 105× 2 +2 ×× 105× 3= 22
1.4.4
–9= 675 ns
(500 × 1 + 50 × 5 + 100 × 5 + 50 × 2) × 0.5 × 10
time × clock rate/No. instr.
1.4.5 CPI= t ime
CPI=675 ×10–9×2 ×109/700=1.92
1.4.6
–9= 550 ns
Time = (500 × 1 + 50 × 5 + 50 × 5 + 50 × 2) × 0.5 × 10
Speed-up = 675 ns/550 ns = 1.22
CPI = 550 × 10–9× 2 × 109/700 = 1.57
Chapter 1 Solutions S5
Solution 1.5
1.5.1
a. 1G, 0.75G inst/s
b. 1G, 1.5G inst/s
1.5.2
a. P2 is 1.33 times faster than P1
b. P1 is 1.03 times faster than P2
1.5.3
a. P2 is 1.31 times faster than P1
b. P1 is 1.00 times faster than P2
1.5.4
a. 2.05 µs
b. 1.93 µs
1.5.5
a. 0.71 µs
b. 0.86 µs
1.5.6
a. 1.30 times faster
b. 1.40 times faster
Solution 1.6
1.6.1
Compiler A CPI Compiler B CPI
a. 1.00 1.17
b. 0.800.58
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论