lecture 2 digital computer systems
DESCRIPTION
Lecture 2 Digital Computer SystemsTRANSCRIPT
1
Digital Computer Systems
EE 344
Lecture 2: OverviewProf. Bruce Kim
2
High Level Language
Assembly Language
Machine Language
Microarchitecture
Logic Level
Problem Algorithm Development Programmer
Compiler (translator)
Assembler (translator)
Control Unit (Interpreter)
Microsequencer (Interpreter)
Device Level Semiconductors Quantum
3
Advantages of Higher Level Language
AMD Barcelona Multi-core
4
Instruction Set Architecture (ISA)
5
Technology Road Map
Changes in Technology
6
Can We Solve Anything by a Computer?
• Undecidable – Cannot be solved by an algorithm – e.g. Halting problem (given a program and inputs
for it, decide whether it will run forever or will eventually halt. )
• Unsolvable– No finite algorithm– e.g. Goldbach’s conjecture (Every even number
greater than 2 can be written as the sum of two primes. )
• Intractable– Unreasonable amount of time and resources
Hierarchical View of a Computer System
• A computer system is complicated • In order to facilitate its study and
analysis, it is advisable to divide it into levels
7
How do we Understand computers?
• Need to understand abstractions such:– Algorithms– Applications software– Systems software– Assembly Language– Machine Language (ISA)– Microarchitecture– Logic design– Device level– Semiconductors/Silicon used to build transistors– Properties of atoms, electrons, and quantum
dynamics• So much to learn!
A little bit of Vocabulary
Level N Level N-1
Level N Level N-1
Language A
Language A
Language B
Language B
Static Program Static Program
Individual Step of a Dynamic Program
Equivalent SequenceOf Steps
Almost always in software
In software SimulatorIn hardware Emulator
8
Problem Definition Level
• Taking a complex real-life problem and formulating it so as to be solved by a computer (abstraction/modeling)
• Requires simplification (which details to remove?)
• Using mathematical model, graph theory, etc.
Algorithm Level
• Precise step-by-step procedure• Steps must be well defined, to be
executed by a machine (no ambiguity)• Algorithm development is a creative
process• Finite number of steps• Pseudocode or flowchart
9
High-Level Language Level
• e.g. C/C++/C#, Java, Fortran, Lisp, etc.• Used by application programmers and
systems programmers• Can we build machines executing HLL
right away?• Compiler’s job is not only translating
Assembly Language Level
• More primitive instructions than HLL• English version of the machine language
+ some more• User mode and kernel mode• Can we go from this level to HLL?
10
ISA (Instruction Set Architecture) level
• A very important abstraction– interface between hardware and low-level software– advantage: different implementations of the same
architecture– disadvantage: sometimes prevents using new innovations
True or False: Binary compatibility is extraordinarily important?
• Modern instruction set architectures:– IA-32, PowerPC, MIPS, SPARC, ARM, and others
Instructions
• Language of the Machine• Platform-specific• A limited set of machine language commands
"understood" by hardware (e.g. ADD, LOAD, STORE, RET)
• We’ll be working with the MIPS instruction set architecture– similar to other architectures developed since the 1980's– Almost 100 million MIPS processors manufactured in 2002– used by NEC, Nintendo, Cisco, Silicon Graphics, Sony, …
11
CISC Vs RISC• Semantic Gap: the ratio of the number of
instruction in the high level language versus the number of instructions in the instruction set level.
• If the gap is small, then the instructions in the instruction set level are complicated (Complex Instruction Set Computing). This affects the performance.
• Hence (Reduced Instruction Set Computing) is used, where each instruction in the instruction set is simple.
1400
1300
1200
1100
1000
900
800
700
600
500
400
300
200
100
01998 2000 2001 20021999
Other
SPARC
Hitachi SH
PowerPC
Motorola 68K
MIPS
IA-32
ARM
12
Microarchitecture Level
• Resources and techniques used to implement the ISA– Pentium IV implements the x86 ISA– Motorola G4 implements the Power PC ISA
• Register files, ALU, Fetch unit, etc.• Realize intended cost/performance
goals• Interpretation done by the control unit
Logic-Design Level
• Gates• Multiplexers, decoders, PLA, etc.• Synchronous (i.e. clocked) : the most
widely used• Asynchronous
13
Device Level
• Transistors and wires• Implement the digital logic gates• Lower level:
– Solid state physics– Machine looks more analog than digital!
Intel Pentium 4 (3.06GHz)
14
What have we learned till now?
• We have just scratched the surface of computing
• We have laid a solid foundation for computing and computers
• Can we now answer the question: what is a computer? [depends on the level ]
• Always remember: Computers are generally designed as a series of architectural abstractions, each one implementing the one immediately above it.
Performance Metrics
15
Performance Metrics
Throughput versus Response Time • Response time (execution time) – the time between
the start and the completion of a task – Important to individual users
• Throughput (bandwidth) – the total amount of work done in a given time – Important to data center managers
• Will need different performance metrics as well as a different set of applications to benchmark embedded and desktop computers, which are more focused on response time, versus servers, which are more focused on throughput
16
Defining (Speed) Performance
Relative Performance Example
17
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
Performance Factors
18
Review: Machine Clock Rate
Improving Performance Example
19
Clock Cycles per Instruction
Using the Performance Equation
20
Effective (Average) CPI
THE Performance Equation
21
Factors of CPU Performance
A Simple Example
22
Workloads and Benchmarks
SPEC CINT2006 on Barcelona (CC = 0.4 x 109)
23
Summary: Evaluating ISAs
Pitfall: Amdahl’s Law
24
Pitfall: MIPS as a Performance Metric
Power Trends
25
Uniprocessor Performance
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