Chapter 1: The Foundations: Logic and Proofs - Help-A-Bull
Download
Report
Transcript Chapter 1: The Foundations: Logic and Proofs - Help-A-Bull
Lecture 2
• Last Lecture
–
–
–
–
–
–
Computer Organization vs. Computer Architecture
Principle of equivalence of hardware and software
Computer Evolution
Moore’s Law vs. Rock’s Law
Main Components of a Computer
Measures of Capacity, Speed, Time, Space
• Today’s Lecture
– The Computer Level Hierarchy
– The Von Neumann Model
– Non-Von Neumann Model
1
Computer Organization vs. Architecture
• 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 and abstract of system implementation as seen by the programmer.
– E.g., instruction sets, instruction formats, data types, addressing modes,
memory access methods, and I/O mechanisms.
– How do I design a computer?
• Principle of Equivalence of Hardware and Software:
– Any task done by software can also be done using hardware, and any
operation performed directly by hardware can be done using software.*
* Assuming speed is not a concern.
2
Computer Evolution
• Generation Zero: Mechanical Calculating Machines
– Calculating Clock : First mechanical calculator, add and subtract numbers with as many as six digits.
– Pascaline : Addition with carry and subtraction.
– Difference Engine & Analytical Engine - Charles Babbage
• Based on a calculating technique called the method of difference
• The Analytical Engine included several components associated with modern
computers: an arithmetic processing unit to perform calculations, a memory, and
input and output devices.
• “the father of computing”
– Punched card tabulating machines: data input
• Electronics technology continues to evolve
– Increased capacity and performance
– Reduced cost
3
Computer Evolution
• The first completely electronic computer, ABC solved systems
of linear equations
• ENIAC was the first all-electronic, general-purpose digital
computer.
Year
Technology
Relative performance/cost
1951
Vacuum tube
1965
Transistor
1975
Integrated circuit (IC)
1995
Very large-scale Integrated Circuit
2,400,000
2013
Ultra large-scale Integrated Circuit
250,000,000,000
1
35
900
4
Moore’s Law vs. Rock’s Law
• Moore’s law: The transistor density of
semiconductor chips would double
roughly every 18 months.
• Rock’s law: The cost of capital
equipment to build semiconductors will
double every four years.
• Rock's law can be seen as the
economic flip side to Moore’s Law.
• 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
Computer Components
• At the most basic level, a computer is a device
consisting of three pieces:
– A processor to interpret and execute programs
– A memory to store both data and programs
– A mechanism for data input and output
6
Measures of Capacity and Speed
• Typical measures of capacity: KB, MB, GB, TB
• Typical measures of speed: kb/s, Mb/s, Gb/s, MHz, GHz
Prefix
Symbol
Power of 10
Power of 2
Kilo
K
1 thousand = 103
210=1024
Mega
M
1 million = 106
220
Giga
G
1 billion = 109
230
Tera
T
1 trillion= 1012
240
Peta
P
1 quadrillion = 1015
250
Exa
E
1 quintillion = 1018
260
Zetta
Z
1 sexitillion = 1021
270
Yotta
Y
1 septillion = 1024
280
Whether a metric refers to a power of 10 or a power of 2 typically
depends upon what is being measured.
7
Measures of Time and Space
• Typical measures of Time: 𝑚𝑠, 𝜇𝑠
• Typical measures of space: 𝑚𝑚, 𝜇𝑚, 𝑛𝑚
Prefix
Symbol
Power of 10
Power of 2
Milli
𝑚
1 thousandth = 10-3
2-10
Micro
𝜇
1 millionth = 10-6
2-20
Nano
𝑛
1 billionth = 10-9
2-30
Pico
𝑝
1 trillionth= 10-12
2-40
Femto
𝑓
1 quadrillionth = 10-15
2-50
Atto
𝑎
1 quintillionth = 10-18
2-60
Zepto
𝑧
1 sexitillionth = 10-21
2-70
Yocto
𝑦
1 septillionth = 10-24
2-80
Generally, negative powers refer to powers of 10, not powers of 2.
8
Exercises Solution
a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
1 second =
1000
milliseconds
1 second = 1,000,000
microseconds
1 millisecond =
1,000,000
nanoseconds
1 milliseconds = 1,000
microseconds
1 microseconds = 1,000
nanoseconds
1 GB = 1,000,000 (or 230/210=220)
KBs
1 MB = 1,000 (or 220/210=210)
KBs
1 GB = 1,000 (or 230/220=210)
MBs
20 MBs = 20,000,000 or (or 20 * 220)
Bytes
2 GBs = 2,000,000(or 231/210=221)
KBs
9
Lecture 2
• Last Lecture
–
–
–
–
–
–
Computer Organization vs. Computer Architecture
Principle of equivalence of hardware and software
Computer Evolution
Moore’s Law vs. Rock’s Law
Main Components of a Computer
Measures of Capacity, Speed, Time, Space
• Today’s Lecture
– The Computer Level Hierarchy
– The Von Neumann Model
– Non-Von Neumann Model
10
Divide and Conquer
•
•
•
•
Divide a problem into modules.
Design each module separately.
Each module performs a specific task
Modules need only know how to interface with other
modules to make use of them.
• Computer system organization can be approached in a
similar manner?
– Abstraction:
•
•
•
•
The machine is built from a hierarchy of levels,
Each level has a specific function,
Each level exists as a distinct hypothetical machine, also called virtual machine.
Each level’s virtual machine executes its own particular set of instructions,
calling upon machines at lower levels to carry out the tasks when necessary.
11
1.6 The Computer Level Hierarchy
• 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.
12
The Computer Level Hierarchy
• Level 6: The User Level
– Program execution and user interface level.
– The level with which we are most familiar.
– Executable programs
• 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.
13
The Computer Level Hierarchy
• 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.
14
1.6 The Computer Level Hierarchy
• 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.
15
1.6 The Computer Level Hierarchy
• 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.
16
1.6 The Computer Level Hierarchy
• 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.
17
The Stored Program Computer
• 1943: ENIAC
– Inventor: John Mauchly and J. Presper Echert.
– The first all-electronic, general-purpose digital
computer.
– 18,000 tubes
– Memory: 20 10-digit numbers (decimal)
– Hard-wired program -- settings of dials,
switches and cables.
– Completed in 1946.
• 1944: Beginnings of EDVAC(Electronic Discrete
Variable Automatic Computer)
– Program stored in memory
– Binary operation
– Not published due to World War II .
– Completed in 1952
18
A poster showing a photograph
of the army's ENIAC computer.
The von Neumann Model
• 1945: John von Neumann
– Wrote a report on the stored program concept, known as the First Draft of a
Report on EDVAC
• The basic structure proposed in the draft became known as
the “von Neumann machine” (or model).
– a memory, containing instructions and data
– a processing unit, for performing arithmetic and logical
operations
– a control unit, for interpreting instructions
19
The von Neumann Model
• Today’s stored-program machine architecture:
– Three hardware systems:
• A central processing unit (CPU) with a control unit, an arithmetic
logic unit (ALU), registers (small storage areas)
• A main memory system
– Holds the programs that control the computer’s operation
• 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.
20
The von Neumann Model
• A general depiction
of a von Neumann
system.
• Employ a fetchdecode-execute
cycle to run
programs
21
Instruction Processing: FETCH
• The control unit fetches the next instruction from memory
using the program counter to determine where the instruction
is located.
22
Instruction Processing: DECODE
• The instruction is decoded into a language that the ALU can
understand.
23
Instruction Processing: FETCH OPERANDS
• Any data operands required to execute the instruction are
fetched from memory and placed into registers within the CPU.
24
Instruction Processing: EXECUTE
• The ALU executes the instruction and places results in
registers or memory.
25
Fetch-Decode-Execute cycle
Fetch instruction from memory
Decode instruction
Evaluate address
Fetch operands from memory
Execute operation
Store result
26
System Bus Model: Extension to von
Neumann Architecture
• von Neumann bottleneck: A single data path between the CPU and main
memory.
– Data bus: moving data between the main memory and the CPU registers.
– Address bus: holds the address of the data that the data bus is currently
accessing.
– Control bus: carries the necessary control signals that specify how the
information transfer is to take place.
The Modified von Neumann Architecture, Adding a System Bus.
27
Today’s von Neumann Model
• Programs and data
– stored in a slow-to-access storage medium,
such as a hard disk.
– Copied to a fast-access, volatile storage
medium such as RAM prior to execution.
28
Non-von Neumann Models
• Improvements to conventional stored-program computers
– adding specialized buses, floating-point units, and cache
memories.
• But enormous improvements in computational power
require departure from the classic von Neumann
architecture.
• Parallel processing refers to a collection of different
architectures:
– Multiple separate computers working together
– Multiple processors sharing memory
– Multiple cores integrated onto the same chip
• Cooperating von Neumann machines: parallel processing
computers
29
Standards Organizations
• 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.
• The International Telecommunications Union (ITU)
– Concerns itself with the interoperability of
telecommunications systems, including data
communications and telephony.
30
Standards Organizations
• National groups establish standards within their
respective countries:
– The American National Standards Institute (ANSI)
– The British Standards Institution (BSI)
• 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.
31