25
1 Digital Computer Systems EE 344 Lecture 2: Overview Prof. Bruce Kim

Lecture 2 Digital Computer Systems

  • Upload
    sra893

  • View
    10

  • Download
    0

Embed Size (px)

DESCRIPTION

Lecture 2 Digital Computer Systems

Citation preview

Page 1: Lecture 2 Digital Computer Systems

1

Digital Computer Systems

EE 344

Lecture 2: OverviewProf. Bruce Kim

Page 2: Lecture 2 Digital Computer Systems

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

Page 3: Lecture 2 Digital Computer Systems

3

Advantages of Higher Level Language

AMD Barcelona Multi-core

Page 4: Lecture 2 Digital Computer Systems

4

Instruction Set Architecture (ISA)

Page 5: Lecture 2 Digital Computer Systems

5

Technology Road Map

Changes in Technology

Page 6: Lecture 2 Digital Computer Systems

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

Page 7: Lecture 2 Digital Computer Systems

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

Page 8: Lecture 2 Digital Computer Systems

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

Page 9: Lecture 2 Digital Computer Systems

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?

Page 10: Lecture 2 Digital Computer Systems

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, …

Page 11: Lecture 2 Digital Computer Systems

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

Page 12: Lecture 2 Digital Computer Systems

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

Page 13: Lecture 2 Digital Computer Systems

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)

Page 14: Lecture 2 Digital Computer Systems

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

Page 15: Lecture 2 Digital Computer Systems

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

Page 16: Lecture 2 Digital Computer Systems

16

Defining (Speed) Performance

Relative Performance Example

Page 17: Lecture 2 Digital Computer Systems

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

Page 18: Lecture 2 Digital Computer Systems

18

Review: Machine Clock Rate

Improving Performance Example

Page 19: Lecture 2 Digital Computer Systems

19

Clock Cycles per Instruction

Using the Performance Equation

Page 20: Lecture 2 Digital Computer Systems

20

Effective (Average) CPI

THE Performance Equation

Page 21: Lecture 2 Digital Computer Systems

21

Factors of CPU Performance

A Simple Example

Page 22: Lecture 2 Digital Computer Systems

22

Workloads and Benchmarks

SPEC CINT2006 on Barcelona (CC = 0.4 x 109)

Page 23: Lecture 2 Digital Computer Systems

23

Summary: Evaluating ISAs

Pitfall: Amdahl’s Law

Page 24: Lecture 2 Digital Computer Systems

24

Pitfall: MIPS as a Performance Metric

Power Trends

Page 25: Lecture 2 Digital Computer Systems

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