Introduction To Computer Systems: 1 Bryant and O'Hallaron, Computer Systems: A Programmer's Perspective, Third Edition
Introduction To Computer Systems: 1 Bryant and O'Hallaron, Computer Systems: A Programmer's Perspective, Third Edition
Introduction To Computer Systems: 1 Bryant and O'Hallaron, Computer Systems: A Programmer's Perspective, Third Edition
Lecture 1
Everything is bits
Each bit is 0 or 1
By encoding/interpreting sets of bits in various ways
Computers determine what to do (instructions)
… and represent and manipulate numbers, sets, strings, etc…
Why bits? Electronic Implementation
Easy to store with bistable elements
Reliably transmitted on noisy and inaccurate wires
0 1 0
1.1V
0.9V
0.2V
0.0V
char 1 1 1
short 2 2 2
int 4 4 4
long 4 8 8
float 4 4 4
double 8 8 8
pointer 4 8 8
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
Logic gates
System software
Transistors Compiler: translates HLL code to
machine code
Computer Architecture or
Instruction Set Architecture Operating System: service code
Handling input/output
Managing memory and storage
Scheduling tasks & sharing resources
Hardware
Processor, memory, I/O controllers
Software
Compiler Assembler
Hardware
Components of a Computer
The BIG Picture Same components for
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
Input
Control
Datapath Memory
Central Processing
Unit (CPU)
Application
or “processor” Output
software
Systems software
Hardware
Anatomy of a Computer
Output
device
Network
cable
Input Input
device device
Instruction
software
Systems software
Software Hardware
set
Hardware
software
instruction set
hardware
ISA
Computer Architecture =
Instruction Set Architecture + Machine Organization
Course Organization
• ~4 quizes
• ~4 assignments –assignments due at the start of class
26
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 26
Carnegie Mellon
Microprocessor Performance
Summary
29
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 29
Carnegie Mellon
Important Trends
30
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 30
Carnegie Mellon
Important Trends
32
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 32
Carnegie Mellon
provide security
Manufacturing Process
• The wafer is chopped into many dies – the size of the die
determines yield and cost
35
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 35
Carnegie Mellon
36
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 36
Carnegie Mellon
37
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 37
Carnegie Mellon
Performance Metrics
• Possible measures:
response time – time elapsed between start and end
of a program
throughput – amount of work done in a fixed time
38
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 38
Carnegie Mellon
Execution Time
39
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 39
Carnegie Mellon
Performance Equation - I
41
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 41
Carnegie Mellon
Performance Equation - II
43
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 43
Carnegie Mellon
44
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 44
Carnegie Mellon
Example
Benchmark Suites
46
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 46
Carnegie Mellon
SPEC CPU
• The SPEC rating specifies how much faster a system is, compared to
a baseline machine – a system with SPEC rating 600 is 1.5 times
faster than a system with SPEC rating 400
• Note that this rating incorporates the behavior of all 29 programs – this
may not necessarily predict performance for your favorite program!
47
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 47
Carnegie Mellon
48
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 48
Carnegie Mellon
Amdahl’s Law
Common Principles
• Amdahl’s Law
50
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 50
Carnegie Mellon
51
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition 51