Sie sind auf Seite 1von 25

EE 344

Digital Computer Systems


Lecture 2: Overview
Prof. Bruce Kim

Problem Algorithm Development Programmer


High Level Language
Compiler (translator)
Assembly Language
Assembler (translator)
Machine Language
Control Unit (Interpreter)
Microarchitecture
Microsequencer (Interpreter)
Logic Level
Device Level Semiconductors Quantum

Advantages of Higher Level Language

AMD Barcelona Multi-core

Instruction Set Architecture (ISA)

Technology Road Map

Changes in Technology

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. Goldbachs 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

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


Language A
Level N

Language B
Almost always in software

Static Program

Static Program

Language A
Level N
Individual Step of
a Dynamic Program

Level N-1

Language B
In software Simulator
In hardware Emulator

Level N-1
Equivalent Sequence
Of Steps

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

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?
Compilers 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?

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)
Well 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,

10

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

Other

1200

SPARC
Hitachi SH

1100

PowerPC

1000

Motorola 68K

900

MIPS
IA-32

800

ARM

700
600
500
400
300
200
100
0
1998

1999

2000

2001

2002

11

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

12

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)

13

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

14

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

15

Defining (Speed) Performance

Relative Performance Example

16

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

17

Review: Machine Clock Rate

Improving Performance Example

18

Clock Cycles per Instruction

Using the Performance Equation

19

Effective (Average) CPI

THE Performance Equation

20

Factors of CPU Performance

A Simple Example

21

Workloads and Benchmarks

SPEC CINT2006 on Barcelona (CC = 0.4 x 109)

22

Summary: Evaluating ISAs

Pitfall: Amdahls Law

23

Pitfall: MIPS as a Performance Metric

Power Trends

24

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

25

Das könnte Ihnen auch gefallen