Professional Documents
Culture Documents
Chapter 1 - Computer Abstractions Technology432
Chapter 1 - Computer Abstractions Technology432
Computer Architecture
Chapter 1: Computer Abstractions and Technology
Computer Architecture 1
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Industrial Revolutions
Computer Architecture 2
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 3
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Source: Internet
Chapter 1: Computer Technology 7
Computer Architecture 4
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 5
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Classes of Computers
• Personal computers
– General purpose, variety of software
– Subject to cost/performance tradeoff
• Server computers
– Network based
– High capacity, performance, reliability
– Range from small servers to building sized
Classes of Computers
• Supercomputers
– High-end scientific and engineering calculations
– Highest capability but represent a small fraction of
the overall computer market
• Embedded computers
– Hidden as components of systems
– Stringent power/performance/cost constraints
Computer Architecture 6
Chapter 1 — Computer Abstractions & Technology September 3, 2022
source: BusinessInsider
Chapter 1: Computer Technology 13
Computer Architecture 7
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Understanding Performance
• Algorithm
– Determines number of operations executed
• Programming language, compiler, architecture
– Determine number of machine instructions executed per
operation
• Processor and memory system
– Determine how fast instructions are executed
• I/O system (including OS)
– Determines how fast I/O operations are executed
Quiz
1. The number of embedded processors sold every year greatly
outnumbers the number of PC and even PostPC processors. Can
you confirm or deny this insight based on your own experience?
Try to count the number of embedded processors in your home.
How does it compare with the number of conventional computers
in your home?
2. As mentioned earlier, both the software and hardware affect the
performance of a program. Can you think of examples where each
of the following is the right place to look for a performance
bottleneck?
– The algorithm chosen
– The programming language or compiler
– The operating system
– The processor
– The I/O system and devices
Computer Architecture 8
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 9
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Components of a Computer
• Same components for
The BIG Picture
all kinds of computer
– Desktop, server,
embedded
• Input/output includes
– User-interface devices
• Display, keyboard, mouse
– Storage devices
• Hard disk, CD/DVD, flash
– Network adapters
• For communicating with
other computers
Touchscreen
• PostPC device
• Replace keyboard and
mouse
• Resistive and Capacitive
types
– Most tablets, smart
phones use capacitive
– Capacitive allows
multiple touches
simultaneously
Computer Architecture 10
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer board
Computer Architecture 11
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 12
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Networks
• Communication, resource sharing, nonlocal
access
• Local area network (LAN): Ethernet
• Wide area network (WAN): the Internet
• Wireless network: WiFi, Bluetooth
Computer Architecture 13
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Abstractions
The BIG Picture
• Abstraction helps us deal with complexity
– Hide lower-level detail
• Instruction set architecture (ISA)
– The hardware/software interface
• Application binary interface
– The ISA plus system software interface
• Implementation
– The details underlying and interface
Chapter 1: Computer Technology 27
software
hardware
Computer Architecture 14
Chapter 1 — Computer Abstractions & Technology September 3, 2022
1200
MIPS
1000
Motorola 68K
800
PowerPC
600
Hitachi SH
400
SPARC
200
Other
0
1998 1999 2000 2001 2002
Computer Architecture 15
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Technology Trends
• Electronics technology
continues to evolve
– Increased capacity and
performance
– Reduced cost
DRAM capacity
Computer Architecture 16
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Semiconductor Technology
• Silicon: semiconductor
• Add materials to transform properties:
– Conductors
– Insulators
– Switch
Manufacturing ICs
Computer Architecture 17
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 18
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Quiz
• A key factor in determining the cost of an integrated circuit
is volume. Which of the following are reasons why a chip
made in high volume should cost less?
1. With high volumes, the manufacturing process can be tuned
to a particular design, increasing the yield.
2. It is less work to design a high-volume part than a low-volume
part.
3. The masks used to make the chip are expensive, so the cost
per chip is lower for higher volumes.
4. Engineering development costs are high and largely
independent of volume; thus, the development cost per die is
lower with high-volume parts.
5. High-volume parts usually have smaller die sizes than low-
volume parts and therefore have higher yield per wafer
Computer Architecture 19
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Defining Performance
• Which airplane has the best performance?
Boeing 777 Boeing 777
BAC/Sud BAC/Sud
Concorde Concorde
Douglas DC- Douglas DC-
8-50 8-50
0 100 200 300 400 500 0 2000 4000 6000 8000 10000
BAC/Sud BAC/Sud
Concorde Concorde
Douglas DC- Douglas DC-
8-50 8-50
Computer Architecture 20
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Relative Performance
• Define Performance = 1/Execution Time
• “X is n time faster than Y”
Performance X Performance Y
= Execution time Y Execution time X = n
• Example: time taken to run a program
– 10s on A, 15s on B
– Execution TimeB / Execution TimeA
= 15s / 10s = 1.5
– So A is 1.5 times faster than B
Chapter 1: Computer Technology 41
Computer Architecture 21
Chapter 1 — Computer Abstractions & Technology September 3, 2022
CPU Clocking
• Operation of digital hardware governed by a
constant-rate clock
Clock period
Clock (cycles)
Data transfer
and computation
Update state
CPU Time
CPU Time = CPU Clock Cycles Clock Cycle Time
CPU Clock Cycles
=
Clock Rate
• Performance improved by
– Reducing number of clock cycles
– Increasing clock rate
– Hardware designer must often trade off clock rate
against cycle count
Computer Architecture 22
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 23
Chapter 1 — Computer Abstractions & Technology September 3, 2022
CPI Example
• Computer A: Cycle Time = 250ps, CPI = 2.0
• Computer B: Cycle Time = 500ps, CPI = 1.2
• Same ISA, compiler
• Which is faster, and by how much?
CPU Time = Instruction Count CPI Cycle Time
A A A
= I 2.0 250ps = I 500ps A is faster…
CPU Time = Instruction Count CPI Cycle Time
B B B
= I 1.2 500ps = I 600ps
B = I 600ps = 1.2
CPU Time
…by this much
CPU Time I 500ps
A
Chapter 1: Computer Technology 47
Relative frequency
Chapter 1: Computer Technology 48
Computer Architecture 24
Chapter 1 — Computer Abstractions & Technology September 3, 2022
CPI Example
• Alternative compiled code sequences using
instructions in classes A, B, C
Class A B C
CPI for class 1 2 3
IC in sequence 1 2 1 2
IC in sequence 2 4 1 1
◼ Sequence 1: IC = 5 ◼ Sequence 2: IC = 6
◼ Clock Cycles ◼ Clock Cycles
= 2×1 + 1×2 + 2×3 = 4×1 + 1×2 + 1×3
= 10 =9
◼ Avg. CPI = 10/5 = 2.0 ◼ Avg. CPI = 9/6 = 1.5
Chapter 1: Computer Technology 49
Exercise
• A program consists of 1000 instructions in which:
– 30% load/store instructions, CPI = 2.5
– 10% jump instructions, CPI = 1
– 20% branch instructions, CPI = 1.5
– The rest are arithmetic instructions, CPI = 2.0
• The program is executed on a 2 GHz CPU
a) What is execution time (CPU time) of the program?
b) What is the weight average CPI of the program?
c) If load/store instructions are improved so that their
execution time is reduced by a factor of 2, what is the
speed-up of the system?
Computer Architecture 25
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Performance Summary
The BIG Picture
Instructio ns Clock cycles Seconds
CPU Time =
Program Instructio n Clock cycle
• Performance depends on
– Algorithm: affects IC, possibly CPI
– Programming language: affects IC, CPI
– Compiler: affects IC, CPI
– Instruction set architecture: affects IC, CPI, Tc
Quiz
• A given application written in Java runs 15
seconds on a desktop processor. A new Java
compiler is released that requires only 0.6 as
many instructions as the old compiler.
Unfortunately, it increases the CPI by 1.1. How
fast can we expect the application to run using
this new compiler?
– 15 x 0.6 x 1.1 = 9.9 sec
Computer Architecture 26
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Power Trends
10000 3600 120
3900
2000 2667 3300 3400
100
1000
frequency 103
95
Frequency (MHz)
200 87 80
Power (W)
66 75.3 77
100 65 60
25
16 power
12.5 40
29.1
10
10.1 20
3.3 4.1 4.9
1 0
Pentium Pro
Pentium 4
Willamette
Core i5 Ivy
Pentium 4
Prescott
Skylake
Core i5
Kentsfield
Pentium
Clarkdal
e (2010)
(2004)
(2015)
Core i5
Bridge
(1982)
(1985)
(1989)
(1993)
(1997)
(2001)
(2012)
80286
80486
80386
Core 2
(2007)
• In CMOS IC technology
𝑃𝑜𝑤𝑒𝑟𝑑𝑦𝑛𝑎𝑚𝑖𝑐 = Capacitive load × Voltage2 × Frequency
×30 5V → 1V ×1000
Chapter 1: Computer Technology 53
Computer Architecture 27
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Reducing Power
• Suppose a new CPU has
– 85% of capacitive load of old CPU
– 15% voltage and 15% frequency reduction
Pnew Cold 0.85 (Vold 0.85)2 Fold 0.85
= = 0.854 = 0.52
Cold Vold Fold
2
Pold
Computer Architecture 28
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Uniprocessor Performance
Multiprocessors
• Multicore microprocessors
– More than one processor per chip
• Requires explicitly parallel programming
– Compare with instruction level parallelism
• Hardware executes multiple instructions at once
• Hidden from the programmer
– Hard to do
• Programming for performance
• Load balancing
• Optimizing communication and synchronization
Chapter 1: Computer Technology 58
Computer Architecture 29
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 30
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 31
Chapter 1 — Computer Abstractions & Technology September 3, 2022
10 10
Overall ssj_ops per Watt = ssj_opsi poweri
i =0 i =0
Computer Architecture 32
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Computer Architecture 33
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Amdahl’s Law
• “X is N% faster than Y.”
Execution Time of Y N
= 1+
Execution Time of X 100
• Assume enhancement E accelerates a fraction F of the task by a factor S
– F: The fraction enhanced
– S: The speedup of the enhanced fraction
Computer Architecture 34
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Quiz
• Overall speedup if we make 90% of a program
run 10 times faster.
– F = 0.9 S = 10
1
Overall Speedup = = 5.26
𝐹
(1 − 𝐹) +
𝑆
Computer Architecture 35
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Quiz
Computer Architecture 36
Chapter 1 — Computer Abstractions & Technology September 3, 2022
Concluding Remarks
• Cost/performance is improving
– Due to underlying technology development
• Hierarchical layers of abstraction
– In both hardware and software
• Instruction set architecture
– The hardware/software interface
• Execution time: the best performance measure
• Power is a limiting factor
– Use parallelism to improve performance
Computer Architecture 37