CS计算机代考程序代写 database compiler Java computer architecture cache assembly assembler algorithm interpreter Chapter 1

Chapter 1

Introduction

2

Chapter 1 Objectives

• Know the difference between computer organization

and computer architecture.

• Understand units of measure common to computer

systems.

• Understand the evolution of computers.

• Understand the computer as a layered system.

• Be able to explain the von Neumann architecture and

the function of basic computer components.

3

Why study computer organization and

architecture?

– Design better programs, including system

software such as compilers, operating systems,

and device drivers.

– Optimize program behavior.

– Evaluate (benchmark) computer system

performance.

– Understand time, space, and price tradeoffs.

1.1 Overview

4

1.1 Overview

• Computer organization

– Encompasses all physical aspects of computer

systems.

– E.g., circuit design, control signals, memory types.

– How does a computer work?

• Computer architecture
– Logical aspects of system implementation as seen by the

programmer.

– E.g., instruction sets, instruction formats, data types,

addressing modes.

– How do I design a computer?

5

1.2 Computer Components

• There is no clear distinction between matters
related to computer organization and matters

relevant to computer architecture.

• Principle of Equivalence of Hardware and

Software:

– Any task done by software can also be done using

hardware

– Any operation performed directly by hardware can

be done using software (assuming speed is not an

issue)

6

• At the most basic level, a computer is a

device consisting of three pieces:

– A processor to interpret and execute programs

– A form of memory to store both data and

programs

– A mechanism for transferring data to and from

the outside world.

1.2 Computer Components

Questions?

7

8

1.3 An Example System

What does it all mean??

Consider this advertisement:

9

SI Prefixes for larger numbers (Storage and Speed):

• Kilo- (K) = 1 thousand = 103 and 210

• Mega- (M) = 1 million = 106 and 220

• Giga- (G) = 1 billion = 109 and 230

• Tera- (T) = 1 trillion = 1012 and 240

• Peta- (P) = 1 quadrillion = 1015 and 250

• Exa- (E) = 1 quintillion = 1018 and 260

• Zetta- (Z) = 1 sextillion = 1021 and 270

• Yotta- (Y) = 1 septillion = 1024 and 280

1.3 An Example System

Whether a metric refers to a power of ten or a power of

two typically depends upon what is being measured.

10

1.3 An Example System

SI Prefixes for smaller numbers (Physical Size):

• Milli- (m) = 1 thousandth = 10 -3

• Micro- () = 1 millionth = 10 -6

• Nano- (n) = 1 billionth = 10 -9

• Pico- (p) = 1 trillionth = 10 -12

• Femto- (f) = 1 quadrillionth = 10 -15

• Atto- (a) = 1 quintillionth = 10 -18

• Zepto- (z) = 1 sextillionth = 10 -21

• Yocto- (y) = 1 septillionth = 10 -24

11

• Bit = the smallest unit of storage

• Byte = a common unit of storage

– 1 Byte = 8 bits

– 1 KB = 210 = 1024 Bytes

– 1 MB = 220 = 1,048,576 Bytes

– 1 GB = 230 = 1,073,741,824 Bytes

– 1 TB = 240 = 1,099,511,627,776 Bytes

– Main memory (RAM) is measured in MB or GB

– Disk storage is measured in GB or TB

• A Bit is usually represented as lowercase b

• A Byte is usually represented as an uppercase B

1.3 An Example System

12

• Hertz = unit of frequency (operations per second)
– 1MHz = 1,000,000Hz

– Processor speeds are measured in MHz or GHz.

• Second = unit of time

– Hard disk drive access times are often 10 to 20 milliseconds.

– Main memory access times are often 50 to 70 nanoseconds.

• Meter = unit of size

– Micron (micrometer) = 1 millionth of a meter

– Circuits on computer chips are measured in microns

1.3 An Example System

13

• We note that cycle time is the reciprocal of clock
frequency.

• A bus operating at 133MHz has a cycle time of
7.52 nanoseconds:

1.3 An Example System

Now back to the advertisement …

133,000,000 cycles/second = 7.52ns/cycle

14

1.3 An Example System

Consider this advertisement:

15

1.3 An Example System

• Computers with a large main memory capacity

can run largers programs or programs working

on larger data sets at greater speeds than

computers having smaller memories.

• RAM is an acronym for random access

memory. Random access means that memory
contents can be accessed directly if you know its

location.

• RAM typically refers to main memory. Cache is a

type RAM that can be accessed faster than main
memory.

16

1.3 An Example System

• Serial ports send data as a series of pulses along
one or two data lines.

• Parallel ports send data as a single pulse along
at least eight data lines.

• USB, Universal Serial Bus, is an intelligent serial

interface that is self-configuring. (It supports

“plug and play.”)

17

Throughout the remainder of the course, you
will see how these components work and how

they interact with software to make complete

computer systems.

This statement raises two important questions:

What assurance do we have that computer

components will operate as we expect?

And what assurance do we have that

computer components will operate together?

1.3 An Example System

Questions?

18

19

• There are many organizations that set
computer hardware standards– to include

the interoperability of computer components.

• Throughout this course, and in your career,

you will encounter many of them.

• Some of the most important standards-

setting groups are . . .

1.4 Standards Organizations

20

• The Institute of Electrical and Electronic
Engineers (IEEE)

– Promotes the interests of the worldwide

electrical engineering community.

– Establishes standards for computer components,

data representation, and signaling protocols,

among many other things.

1.4 Standards Organizations

21

• The International Telecommunications Union
(ITU)

– Concerns itself with the interoperability of

telecommunications systems, including data

communications and telephony.

• National groups establish standards within their
respective countries:

– The American National Standards Institute (ANSI)

– ECMA International

– The British Standards Institution (BSI)

1.4 Standards Organizations

22

• The International Organization for

Standardization (ISO)

– Establishes worldwide standards for everything

from screw threads to photographic film.

– Is influential in formulating standards for

computer hardware and software, including their

methods of manufacture.

Note: ISO is not an acronym. ISO comes from the Greek,

isos, meaning “equal.”

1.4 Standards Organizations

23

• To fully appreciate the computers of today, it is
helpful to understand how things got the way they

are.

• The evolution of computing machinery has taken

place over several centuries.

• In modern times computer evolution is usually

classified into four generations according to
technology of the era.

We note that many of the following dates are approximate.

1.5 Historical Development

24

• Generation Zero: Mechanical Calculating Machines

(1642 – 1945)

– Calculating Clock – Wilhelm Schickard (1592 – 1635).

– Pascaline – Blaise Pascal (1623 – 1662).

– Difference Engine – Charles Babbage (1791 – 1871), also

designed but never built the Analytical Engine.

– Punched card tabulating machines – Herman Hollerith

(1860 – 1929).

Hollerith cards were commonly used for

computer input well into the 1970s.

1.5 Historical Development

25

• The First Generation: Vacuum Tube Computers (1945 –

1953)

– Atanasoff Berry Computer (1937 –

1938) solved systems of linear

equations.

– John Atanasoff and Clifford Berry of

Iowa State University.

1.5 Historical Development

26

• The First Generation: Vacuum Tube Computers

(1945 – 1953)
– Electronic Numerical Integrator and

Computer (ENIAC)

– John Mauchly and J. Presper Eckert

– University of Pennsylvania, 1946

• The ENIAC was the first general-purpose
computer.

1.5 Historical Development

27

• The First Generation: Vacuum Tube Computers
(1945 – 1953)

– The IBM 650 first mass-produced computer. (1955)

° It was phased out in 1969.

– Other major computer manufacturers of this period

include UNIVAC, Engineering Research Associates

(ERA), and Computer Research Corporation (CRC).

° UNIVAC and ERA were bought by Remington Rand, the

ancestor of the Unisys Corporation.

° CRC was bought by the Underwood (typewriter)

Corporation, which left the computer business.

1.5 Historical Development

28

• The Second Generation: Transistorized
Computers (1954 – 1965)

– IBM 7094 (scientific) and 1401 (business)

– Digital Equipment Corporation (DEC) PDP-1

– Univac 1100

– Control Data Corporation 1604.

– . . . and many others.

1.5 Historical Development

These systems had few architectural similarities.

29

• The Third Generation: Integrated Circuit
Computers (1965 – 1980)

– IBM 360

– DEC PDP-8 and PDP-11

– Cray-1 supercomputer

– . . . and many others.

• By this time, IBM had gained overwhelming
dominance in the industry.

– Computer manufacturers of this era were characterized

as IBM and the BUNCH (Burroughs, Unisys, NCR,

Control Data, and Honeywell).

1.5 Historical Development

30

• The Fourth Generation: VLSI Computers
(1980 – ????)

– Very large scale integrated circuits (VLSI) have more

than 10,000 components per chip.

– Enabled the creation of microprocessors.

– The first was the 4-bit Intel 4004.

– Later versions, such as the 8080, 8086, and 8088

spawned the idea of “personal computing.”

1.5 Historical Development

31

• Moore’s Law (1965)

– Gordon Moore, Intel founder

– “The density of transistors in an integrated circuit will

double every year.”

• Contemporary version:

– “The density of silicon chips doubles every 18 months.”

But this “law” cannot hold forever …

1.5 Historical Development

32

• Rock’s Law

– Arthur Rock, Intel financier

– “The cost of capital equipment to build semiconductors

will double every four years.”

– In 1968, a new chip plant cost about $12,000.

At the time, $12,000 would buy a nice home in

the suburbs.

An executive earning $12,000 per year was

“making a very comfortable living.”

1.5 Historical Development

33

• Rock’s Law

– In 2012, a chip plants under construction cost well

over $5 billion.

– For Moore’s Law to hold, Rock’s Law must fall, or

vice versa. But no one can say which will give out

first.

$5 billion is more than the gross domestic

product of some small countries, including

Barbados, Mauritania, and Rwanda.

1.5 Historical Development

Questions?

34

35

• Computers consist of many things besides
chips.

• Before a computer can do anything worthwhile,

it must also use software.

• Writing complex programs requires a “divide

and conquer” approach, where each program
module solves a smaller problem.

• Complex computer systems employ a similar

technique through a series of virtual machine

layers.

1.6 The Computer Level Hierarchy

36

• Each virtual machine layer

is an abstraction of the level

below it.

• The machines at each level

execute their own particular

instructions, calling upon

machines at lower levels to

perform tasks as required.

• Computer circuits ultimately

carry out the work.

1.6 The Computer Level Hierarchy

37

• Level 6: The User Level

– Program execution and user interface level.

– The level with which we are most familiar.

• Level 5: High-Level Language Level

– The level with which we interact when we write

programs in languages such as C, Pascal, Lisp, and

Java.

1.6 The Computer Level Hierarchy

38

• Level 4: Assembly Language Level

– Acts upon assembly language produced from

Level 5, as well as instructions programmed

directly at this level.

• Level 3: System Software Level

– Controls executing processes on the system.

– Protects system resources.

– Assembly language instructions often pass

through Level 3 without modification.

1.6 The Computer Level Hierarchy

39

• Level 2: Machine Level

– Also known as the Instruction Set Architecture

(ISA) Level.

– Consists of instructions that are particular to the

architecture of the machine.

– Programs written in machine language need no

compilers, interpreters, or assemblers.

1.6 The Computer Level Hierarchy

40

• Level 1: Control Level

– A control unit decodes and executes instructions

and moves data through the system.

– Control units can be microprogrammed or

hardwired.

– A microprogram is a program written in a low-

level language that is implemented by the

hardware.

– Hardwired control units consist of hardware that

directly executes machine instructions.

1.6 The Computer Level Hierarchy

41

• Level 0: Digital Logic Level

– This level is where we find digital circuits (the

chips).

– Digital circuits consist of gates and wires.

– These components implement the mathematical

logic of all other levels.

1.6 The Computer Level Hierarchy

42

• The ultimate aim of every computer system is

to deliver functionality to its users.

• Computer users typically do not care about

terabytes of storage and gigahertz of processor
speed.

• Many companies outsource their data centers

to third-party specialists, who agree to provide

computing services for a fee.

• These arrangements are managed through

service-level agreements (SLAs).

1.7 Computing as a Service: Cloud Computing

43

• Rather than pay a third party to run a

company-owned data center, another

approach is to buy computing services from

someone else’s data center and connect to it
via the Internet.

• This is the idea behind a collection of service

models known as Cloud computing.

1.7 Computing as a Service: Cloud Computing

The “Cloud” is a visual metaphor traditionally

used for the Internet. It is even more apt tor

service-defined computing.

44

• More Cloud computing models:

– Software as a Service, or SaaS. The consumer of this

service buy application services

• Well-known examples include Gmail, Google Docs,

Dropbox, Zoom, and Netflix.

– Platform as a Service, or PaaS. Provides server

hardware, operating systems, database services,

security components, and backup and recovery

services.

• Well-known PaaS providers include Google App Engine

and Microsoft Windows Azure Cloud Services.

1.7 Computing as a Service: Cloud Computing

45

• The general term, Cloud computing, consists of
several models:

– Infrastructure as a Service (IaaS) provides only server

hardware, secure network access to the servers, and backup

and recovery services. The customer is responsible for all

system software including the operating system and

databases.

• Well-known IaaS platforms include Amazon EC2,

Google Compute Engine, Microsoft Azure Services

Platform, Rackspace, and HP Cloud.

1.7 Computing as a Service: Cloud Computing

46

• More Cloud computing models:

– Infrastructure as a Service (IaaS) provides only server

hardware, secure network access to the servers, and backup

and recovery services. The customer is responsible for all

system software including the operating system and

databases.

• Well-known IaaS platforms include Amazon EC2,

Google Compute Engine, Microsoft Azure Services

Platform, Rackspace, and HP Cloud.

– Cloud storage is a limited type of IaaS that includes services

such as Dropbox, Google Drive, and Amazon.com’s Cloud

Drive.

1.7 Computing as a Service: Cloud Computing

47

• Cloud computing relies on the concept of
elasticity where resources can be added and

removed as needed.

• You pay for only what you use.

• Virtualization is an enabler of elasticity.

– Instead of having a physical machine, you have a

“logical” machine that may span several physical

machines, or occupy only part of a single physical

machine.

1.7 Computing as a Service: Cloud Computing

48

• On the ENIAC, all programming was done at
the digital logic level.

• Programming the computer involved moving
plugs and wires.

• A different hardware configuration was needed

to solve every unique problem type.

1.8 The von Neumann Model

Configuring the ENIAC to solve a “simple” problem

required many days labor by skilled technicians.

49

• Inventors of the ENIAC, John Mauchley and
J. Presper Eckert, conceived of a computer

that could store instructions in memory.

• The invention of this idea has since been

ascribed to a mathematician, John von
Neumann, who was a contemporary of

Mauchley and Eckert.

• Stored-program computers have become

known as von Neumann Architecture systems.

1.8 The von Neumann Model

50

• Today’s stored-program computers have the
following characteristics:
– Three hardware systems:

• A central processing unit (CPU)

• A main memory system

• An I/O system

– The capacity to carry out sequential instruction
processing.

– A single data path between the CPU and main memory.

• This single path is known as the von Neumann
bottleneck.

1.8 The von Neumann Model

51

• This is a general
depiction of a von
Neumann system:

• These computers
employ a fetch-
decode-execute
cycle to run
programs as
follows . . .

1.8 The von Neumann Model

52

• The control unit fetches the next instruction from memory using
the program counter to determine where the instruction is
located.

1.8 The von Neumann Model

53

• The instruction is decoded into a language that the ALU
can understand.

1.8 The von Neumann Model

54

• Any data operands required to execute the instruction
are fetched from memory and placed into registers
within the CPU.

1.8 The von Neumann Model

55

• The ALU executes the instruction and places results in
registers or memory.

1.8 The von Neumann Model

56

• Conventional stored-program computers have

undergone many incremental improvements over

the years.

• These improvements include adding specialized

buses, floating-point units, and cache memories,

to name only a few.

• But enormous improvements in computational

power require departure from the classic von

Neumann architecture.

• Adding processors is one approach.

1.9 Non-von Neumann Models

57

• Some of today’s systems have separate buses for

data and instructions.

– Called a Harvard architecture

• Other non-von Neumann systems provide special-

purpose processors to offload work from the main

CPU.

• More radical departures include dataflow

computing, quantum computing, cellular

automata, and parallel computing.

1.9 Non-von Neumann Models

58

• In the late 1960s, high-performance computer

systems were equipped with dual processors to

increase computational throughput.

• In the 1970s supercomputer systems were

introduced with 32 processors.

• Supercomputers with 1,000 processors were built

in the 1980s.

• In 1999, IBM announced its Blue Gene system

containing over 1 million processors.

1.10 Parallel Computing

59

• Parallel processing allows a computer to

simultaneously work on subparts of a problem.

• Multicore processors have two or more processor

cores sharing a single die.

• Each core has its own ALU and set of registers,

but all processors share memory and other

resources.

• “Dual core” differs from “dual processor.”

– Dual-processor machines, for example, have two

processors, but each processor plugs into the

motherboard separately.

1.10 Parallel Computing

60

• Multi-core systems provide the ability to run

multiple tasks at the same time.

• Multithreaded applications take advantage of

multi-core systems by being programmed to run

multiple “threads” of the program at the same

time.

• New programming languages are often necessary

to fully exploit multiprocessor power.

1.10 Parallel Computing

61

• The quest for machine intelligence has been

ongoing for over 300 years.

• The 20th Century witnessed the first machines that

could be human grandmasters at chess when

Deep Blue beat Garry Kasparov in 1997.

• But the machine and the algorithm relied on a

brute force solution, although impressive, hardly

“intelligent” by any measure.

1.11 Parallelism: Enabler of Machine Intelligence

62

• Any definition of true machine “intelligence” would

have to include the ability to acquire new

knowledge independent of direct human

intervention, and the ability to solve problems

using incomplete and perhaps contradictory

information.

• This is precisely what IBM achieved when it build

the machine named Watson.

• Watson proved this when it beat two human

Jeopardy ! champions on February 16, 2011.

1.11 Parallelism: Enabler of Machine Intelligence

63

• Watson had a massively parallel architecture

dubbed DeepQA (Deep Question and Answer).

• The system relied on 90 IBM POWER 750

servers.

• Each server was equipped with four POWER7

processors, and each POWER7 processor had

eight cores, giving a total of 2880 processor

cores.

• While playing Jeopardy!, each core had access to

16TB of main memory and 4TB of storage.

1.11 Parallelism: Enabler of Machine Intelligence

64

• Watson’s technology has been put to work in

treating cancer.

– Commercial products based on Watson technology,

including “Interactive Care Insights for Oncology”

and “Interactive Care Reviewer,” are now available.

• Watson is also becoming more compact: Watson

can now be run on a single POWER 750 server.

• Watson has surely given us a glimpse into the

future of computing.

1.11 Parallelism: Enabler of Machine Intelligence

65

• This chapter has given you an overview of the

subject of computer architecture.

• You should now be sufficiently familiar with

general system structure to guide your studies

throughout the remainder of this course.

• Subsequent chapters will explore many of these

topics in great detail.

Conclusion