0% found this document useful (0 votes)
2 views

COAL lecture 02

The document discusses the evolution and classes of computers, highlighting their applications and performance metrics influenced by various factors such as algorithms, programming languages, and hardware architecture. It explains the components of a computer, including processors, memory, and I/O systems, and emphasizes the importance of abstraction in managing complexity. Additionally, it covers performance measurement, CPU time, and trends in technology and power consumption in computing systems.

Uploaded by

230652
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

COAL lecture 02

The document discusses the evolution and classes of computers, highlighting their applications and performance metrics influenced by various factors such as algorithms, programming languages, and hardware architecture. It explains the components of a computer, including processors, memory, and I/O systems, and emphasizes the importance of abstraction in managing complexity. Additionally, it covers performance measurement, CPU time, and trends in technology and power consumption in computing systems.

Uploaded by

230652
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

LECT - 2

Computer Abstractions
and
Technology
§1.1 Introduction
The Computer Revolution
■ Progress in computer technology
■ Underpinned by Moore’s Law
■ Makes novel applications feasible
■ Computers in automobiles
■ Cell phones
■ Human genome project
■ World Wide Web
■ Search Engines
■ Computers are pervasive
Chapter 1 — Computer Abstractions and Technology —
Classes of Computers
■ Desktop 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
■ Embedded computers
■ Hidden as components of systems
■ Stringent power/performance/cost constraints

Chapter 1 — Computer Abstractions and Technology —


The Processor Market

Chapter 1 — Computer Abstractions and Technology —


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

Chapter 1 — Computer Abstractions and Technology —


Program
§1.2 Below Your
Below Your Program
■ Application software
■ Written in high-level language
■ System software
■ Compiler: translates HLL code to
machine code
■ Operating System: service code
■ Handling input/output
■ Managing memory and storage
■ Scheduling tasks & sharing resources
■ Hardware
■ Processor, memory, I/O controllers

Chapter 1 — Computer Abstractions and Technology —


Levels of Program Code
■ High-level language
■ Level of abstraction closer
to problem domain
■ Provides for
productivity and
portability
■ Assembly language
■ Textual representation of
instructions
■ Hardware representation
■ Binary digits (bits)
■ Encoded instructions and
data Chapter 1 — Computer Abstractions and Technology —
§1.3 Under the Covers
Components of a Computer
The BIG ■ Same components for
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

Chapter 1 — Computer Abstractions and Technology —


Inside the Processor (CPU)
■ Datapath: performs operations on data
■ Control: sequences datapath, memory, ...
■ Cache memory
■ Small fast SRAM memory for immediate
access to data

Chapter 1 — Computer Abstractions and Technology — 9


Inside the Processor
■ AMD Barcelona: 4 processor cores

Chapter 1 — Computer Abstractions and Technology —


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 Abstractions and Technology —
A Safe Place for Data
■ Volatile main memory
■ Loses instructions and data when power off
■ Non-volatile secondary memory
■ Magnetic disk
■ Flash memory
■ Optical disk (CDROM, DVD)

Chapter 1 — Computer Abstractions and Technology —


Networks
■ Communication and resource sharing
■ Local area network (LAN): Ethernet
■ Within a building
■ Wide area network (WAN: the Internet
■ Wireless network: WiFi, Bluetooth

Chapter 1 — Computer Abstractions and Technology —


Technology Trends
■ Electronics
technology
continues to evolve
■ Increased capacity
and performance
DRAM capacity
■ Reduced cost
Year Technology Relative performance/cost
1951 Vacuum tube 1
1965 Transistor 35
1975 Integrated circuit (IC) 900
1995 Very large scale IC (VLSI) 2,400,000
2005 Ultra large scale IC 6,200,000,000

Chapter 1 — Computer Abstractions and Technology —


§1.4 Performance
Defining Performance
■ Which airplane has the best performance?
Boeing 777 Boeing 777

Boeing 747 Boeing 747

BAC/Sud BAC/Sud
Concorde Concorde
Douglas Douglas DC-
DC-8-50 8-50

0 100 200 300 400 0 2000 4000 6000 8000 10000


500

Passenger Capacity Cruising Range (miles)

Boeing 777 Boeing 777

Boeing 747 Boeing 747

BAC/Sud BAC/Sud
Concorde Concorde
Douglas Douglas DC-
DC-8-50 8-50

0 500 1000 1500 0 100000 200000 300000 400000

Cruising Speed (mph) Passengers x mph

Chapter 1 — Computer Abstractions and Technology —


Two Notions of
Plane “Performance”
DC to Paris Speed Passengers Throughput
(pmph)
Boeing 747 6.5 hours 610 mph 470 286,700

Concorde 3 hours 1350 mph 132 178,200

Which has higher performance?


• Time to do the task (Execution Time)
– execution time, response time, latency
• Tasks per day, hour, week, sec, ns. ..
(Performance)
– throughput, bandwidth
Response time and throughput often are in opposition
Response Time and Throughput
■ Response time
■ How long it takes to do a task
■ Throughput
■ Total work done per unit time
■ e.g., tasks/transactions/… per hour
■ How are response time and throughput affected
by
■ Replacing the processor with a faster version?
■ Adding more processors?
■ We’ll focus on response time for now…

Chapter 1 — Computer Abstractions and Technology —


Relative Performance
■ Define Performance = 1/Execution Time
■ “X is n time faster than Y”
Performanc eX Performanc eY
= 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 Abstractions and Technology —
Measuring Execution Time
■ Elapsed time
■ Total response time, including all aspects
■ Processing, I/O, OS overhead, idle time
■ Determines system performance
■ CPU time
■ Time spent processing a given job
■ Discounts I/O time, other jobs’ shares
■ Comprises user CPU time and system CPU
time
■ Different programs are affected differently by
CPU and system performance
Chapter 1 — Computer Abstractions and Technology —
CPU Clocking
■ Operation of digital hardware governed by a
constant-rate clock
Clock period

Clock (cycles)

Data transfer
and computation
Update state

■ Clock period: duration of a clock cycle


■ e.g., 250ps = 0.25ns = 250×10–12s
■ Clock frequency (rate): cycles per second
■ e.g., 4.0GHz = 4000MHz = 4.0×109Hz
Chapter 1 — Computer Abstractions and Technology —
Clock Rate
■ Clock rate (MHz, GHz) is inverse of clock
cycle time (clock period)
CC = 1 / CR

one clock period


10 nsec clock cycle =>
100 MHz clock rate
5 nsec clock cycle =>
200 MHz clock rate
2 nsec clock cycle => 500 MHz clock rate
1 nsec clock cycle => 1 GHz clock rate
500 psec clock cycle => 2 GHz clock rate
250 psec clock cycle => 4 GHz clock rate
CPU Time
CPU Time = CPU Clock Cycles ×Clock Cycle
Time

CPU Clock
=
■ Performance Cycles Clockby
improved

Rate of clock cycles
Reducing number
■ Increasing clock rate
■ Hardware designer must often trade off clock
rate against cycle count

Chapter 1 — Computer Abstractions and Technology —


CPU Time Example
■ Computer A: 2GHz clock, 10s CPU time
■ Designing Computer B
■ Aim for 6s CPU time
■ Can do faster clock, but causes 1.2 × clock cycles
■ How fast must Computer B clock be?

Clock B =
Clock CyclesB 1.2 ×Clock
CPU Time = 6
Rate CyclesA
B s
Clock CyclesA = CPU Time A ×Clock Rate
A

9
= 10s × 2GHz9 = 20
9
×10
Clock 1.2 × 20 ×10 24 =
B = =
Rate ×10 6s 6s 4GHz
Chapter 1 — Computer Abstractions and Technology —
Instruction Count and CPI
Clock Cycles = Instruction Count ×Cycles per Instruction
CPU Time = Instruction Count ×CPI×Clock Cycle
Time

■ Instruction
Instruction Count Count
for a × CPI
program
=
■ Clock
Determined by Rate ISA and compiler
program,
■ Average cycles per instruction
■ Determined by CPU hardware
■ If different instructions have different CPI
■ Average CPI affected by instruction mix

Chapter 1 — Computer Abstractions and Technology —


CPI Example
■ Computer A: Cycle Time = 250ps, CPI = 2.0
■ Computer B: Cycle Time = 500ps, CPI = 1.2
■ Same ISA
■ Which is faster, and by how much?
CPU Time = Instructio n Count × I ×
A
= I× 2.0 × 250ps = I× A is faster…
500ps
CPU Time = Instructio n Count × I
B
× = I×1.2 × 500ps = I×

600ps CPU Time


B = I× 600ps = 1.2 …by this much
CPU Time I×
500ps
A Chapter 1 — Computer Abstractions and Technology —
CPI in More Detail
■ If different instruction classes take
different numbers of cycles
n


Clock Cycles = (CPIi ×Instructio n Count i
)
i=1

■ Weighted average CPI



n
Clock Cycles Instructio n Count
CPI ⎝ i

i
Instructio n Instructio n
∑⎜
= = i=1 CPI ×
Count ⎞Count ⎠
Relative frequency

Chapter 1 — Computer Abstractions and Technology —


Average CPI Example
■ Consider two different implementations, M1 and M2, of the same instruction
set. There are three classes of instructions (A, B, and C) in the instruction
set. The average number of cycles for each instruction class and their
frequencies (for a typical program) are as follows:

■ Calculate the average CPI for each machine, M1, and M2


For Machine M1:
Clocks per Instruction = (60/100)* 1 + (30/100)*2 + (10/100)*4 = 1.6
For Machine M2:
Clocks per Instruction = (60/100)*2 + (30/100)*3 + (10/100)*4 = 2.5

Chapter 1 — Computer Abstractions and Technology —


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 = ■ Avg. CPI = 9/6 =
2.0 1.5
Chapter 1 — Computer Abstractions and Technology —
Performance Summary
The BIG
Picture

Instructio ns Clock cycles


CPU Time = × ×
Seconds 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:
Chapter 1 — Computeraffects
Abstractions IC, CPI, T—c
and Technology
Determinates of CPU Performance
CPU time = Instruction_count x CPI x
clock_cycle Instruction_ CPI clock_cycle
count
Algorithm X X

Programming X X
language
Compiler X X

ISA X X X

Processor X X
organization
Technology X
Wall
§1.5 The Power
Power Trends

■ In CMOS IC technology
Power = Capacitive load × Voltage 2
×Frequency
×30 5V → 1V ×1000

Chapter 1 — Computer Abstractions and Technology —


Reducing Power
■ Suppose a new CPU has
■ 85% of capacitive load of old CPU
■ 15% voltage and 15% frequency reduction
P 2
×Fold × 0.85
new
C × 0.85 ×(Vold × 2 = 0.854 =
P = old C ×V
old 0.85) old old 0.52
×F
old
■ The power wall
■ We can’t reduce voltage further
■ We can’t remove more heat
■ How else can we improve performance?
Chapter 1 — Computer Abstractions and Technology —
Introduction
Single Processor Performance
Move to multi-processor

RISC

Copyright © 2012, Elsevier Inc. All rights


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 Abstractions and Technology —


Readings from Text Book

■ Chapter – 1
Acknowledgements

• Computer Organization and Design The Hardware/Software Interface, David


Patternson & John Hennessy, 5th Edition, 2013
• Computer Architecture A Quantitative Approach, John Hennessy & David
Patternson,
Material in these slides has been taken from, the following

• 5th Edition, 2012


Computer
th
Edition,Architecture
2007 A Quantitative Approach, John Hennessy & David
4
Patternson,
resources

47

You might also like