Download CMSC 104 - Computer Science and Electrical Engineering

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
Machine Architecture
An Introduction
to
Computer Components
CMSC 104
1
Major Computer Components
Central Processing Unit (CPU)
 Bus
 Main Memory (RAM)
 Secondary Storage
 I / O Devices
 Starting the computer

CMSC 104
2
Computer Functional Diagram
CMSC 104
3
CPU
Central Processing Unit
 The “brain”
 Controls all other computer functions

CMSC 104
4
CPU (Continued)

Types
o Intel: 4004, 8008, 8080, 8086, 80186,
80286, 80386, 80486, Pentium, Merced, ?
o Motorola: 6800, 6809, 68000, 68020,
68040, 68060, 68080, RISC, ?
o DEC: PDP-8/10/11, VAX, Alpha, ARM, ?
o AMD: K4, K5, K6, K7, ?
o Zilog: Z80, Z800, Z8000 (Still around?)
CMSC 104
5
CPU (Continued)
Just a collection of fast ON/OFF switches
Forty-million transistors in this space (or less)
CMSC 104
6
CPU (Continued)

CMSC 104
Some MainFrame CPUs are limited by
the speed of light.
7
The Buss
Different major components are
connected by the buss.
 A buss is a group of parallel wires (or
circuit-board connections) that carry
control signals and data between
components.

CMSC 104
8
Main Memory
Main memory is made up of two-state
devices.
 Two state devices have just two
possible states (Wow!). An ON/OFF
switch is a two-state device.
 In memory, one state stands for 1, the
other for 0.

CMSC 104
9
Main Memory (Continued)
Memory can hold any type of data that
can be represented by a combination of
two states --- and only those types.
 Examples:
 1 = yes, 0 = no
 01 = Red, 10 = Blue, 11 = Green
 00 = 0, 01 = 1, 10 = 2, 11 = 3

CMSC 104
10
Main Memory (Continued)

CMSC 104
Memory often made up of capacitors
(electron storage devices).
 “Charged” (“full”)
1, ON, SET.
 “Discharged” (“empty”)
0, OFF, RESET, CLEARED
11
Main Memory (Continued)
“The Incredible Shrinking Capacitor”

Technology is constantly improving
o Experience
smarter engineers
o Smarter engineers
smaller devices
o Smaller devices
cheaper systems
o Cheaper systems
more sales
o More sales
more experience
CMSC 104
12
Main Memory (Continued)
“The Incredible Shrinking Capacitor”
Memory chips now routinely contain
128x220 (“128 Meg”) bits.
 “If car-makers built cars the way chipmakers build chips, we’d all drive
Mercedes-Benzs that cost $4.95, got
1000 miles to the gallon, and fit in our
pockets when we got to our
destination.”

CMSC 104
13
Main Memory ((still) Continued)
Memory is divided into cells, where
each cell contains 8 bits. Remember
that 8 bits is called a byte.
 Each of these cells are numbered. The
number is the cell’s address.
 The address is the, um, ah, er, well the
“address” we use to specify which byte
we want to work with.

CMSC 104
14
Main Memory
“Nepenthe: Elixir of Forgetfulness.”
Main memory is volatile (it goes away
when you turn off the power).
 Capacitors leak
charge goes
away
data is lost.
 “If car-makers … and they would
disappear as soon as we turned off the
engine.”
 There are non-volatile memory systems.

CMSC 104
15
Main Memory
Reading & Writing (for ‘rithmetic)

In addition to the circuitry that holds the
bits, there are other circuits that:
o Get the value of the data held at a
particular address --- READ.
o Store data at particular address --- WRITE.
o Some memory is designed so that it cannot
be written
Read-Only Memory
ROM
o Many types of ROM are non-volatile.
CMSC 104
16
Memory Access
Memory at all addresses can be
accessed in the same amount of time.
 Memory can be accessed in any order,
like cuts on a CD (not “Byte0, Byte1,
Byte3, …, ByteN” like cuts on a tape).
 Access in any order
Random
Access
Random Access Memory
RAM

CMSC 104
17
Secondary Storage

Many Types:
o Disks (Random Access)
o Tapes (Sequential access)

Persistent storage (Stays when the
power goes off)
o Programs
o Data files (binary, text)
o System organization (Directory structure)
CMSC 104
18
I/O
Converts some “real” thing (sound,
movement, electrical signal) into bits.
 Usually done by specialized “add ons”

o Keyboard
o Monitor
o Soundcard

CMSC 104
Sometimes disk and tape drives are
considered I/O devices.
19
Computer/Peripheral Communication
“There be Dragons and Mysteries in these Waters.”

Ports
o Electronic connections through which data
can enter or leave the computer
o Identified by port numbers (like memory
cells are identified by addresses)
o Usually each device (keyboard, soundcard,
network card, modem) with be assigned to
exclusive use of one or more ports
CMSC 104
20
Computer/Peripheral Communication
Doesn’t everyone speak Latin ?

I/O devices normally exchange two
things with the computer
 “Data” --- e.g. bits to and from a
modem --- this is what you want
 “Protocol” --- coordination between
the computer and the device to insure
the data is transmitted correctly --you don’t see it and you don’t want to.
CMSC 104
21
Computer/Peripheral Communication
“No thanks, I peel my own.”

Protocol insures that the device and the
computer “speak the same language.”
 Parity (must there be an even number
of bits per exchange?)
 “Endedness” (some computers
transmit numbers from-left-to-right,
others from-right-to-left)
CMSC 104
22
Computer/Peripheral Communication
“Let’s not both talk at once”

Usually duplex (two-way) rather than
simplex (one-way)
Simplex: mail, TV/Radio broadcast.
o Half-duplex: two-way communication, but
in communication can occur only in one
direction at a time (polite telephone call).
o Full-duplex - allows communication in
both directions at the same time.

CMSC 104
23
Computer/Peripheral Communication
Controllers
Special-purpose “CPUs” designed to
handle I/O
 Free main CPU by taking over comms
tasks.
 Allow more complex I/O, more devices
 So effective that many machines are
designed to use controllers even if only
one device is connected to a port.

CMSC 104
24
Computer/Peripheral Communication
Parallel and Serial Communication
Parallel - All the bits of a pattern are
transferred at the same time, with each
bit being transferred on a separate line.
Requires multi-wire cables. “Gimme
Five!”
 Serial - Transmits one bit at a time.
Slower, but uses a simpler data path.
“Here’s one bit, here’s another bit …”

CMSC 104
25
Bits, Bytes and Words
A bit is a single 1 or 0; a single choice
 A byte is 8 bits

o A word is 16 bits or 2 bytes
o Long word = 4 bytes = 32 bits
o Quad word = 8 bytes = 64 bits
o Programming languages may use these
terms when organizing data

CMSC 104
A <what> is 4 bits?? (It’s a small byte.)
26
More Bits and Bytes
There are 16-, 32-, and 64-bit machines
 All of UMBC Unix systems are 32-bits

CMSC 104
27
Booting the Computer
It refers to the computers start-up
procedure.
 Comes from the expression “pulling
yourself up by your bootstraps”
 Starts with instructions stored in the
ROM chips. (Why: two reasons.)

CMSC 104
28
Booting the Computer (continued)

A typical boot sequence:
o Test critical components (and maybe all
components).
o Turn on and setup critical devices (console,
keyboard, power monitor, operating system
storage media)
o Load operating system (usually from disk)
o Transfer control to operating system.
CMSC 104
29
Booting the Computer (continued)
The Operating System (O/S)

O/S provides fundamental services for
all other tasks:
o data storage
o I/O
o Program execution
O/S is usually stored on disk, but not
always: PalmPilot
 Once O/S is running, computer can be
fully functional.

CMSC 104
30