meljun cortes computer organization_lecture_chapter3

66
Microprocessors Chapter 3 MELJUN CORTES MELJUN CORTES

Upload: meljun-cortes

Post on 16-Feb-2017

31 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: MELJUN CORTES computer organization_lecture_chapter3

MicroprocessorsChapter 3

MELJUN CORTESMELJUN CORTES

Page 2: MELJUN CORTES computer organization_lecture_chapter3

OverviewIn this chapter, you will learn how to

Identify the core components of a CPUDescribe the relationship of CPUs and RAMExplain the varieties of modern CPUsIdentify specialty CPUsInstall and upgrade CPUs

Page 3: MELJUN CORTES computer organization_lecture_chapter3

Central Processing Unit (CPU)Core Components

Page 4: MELJUN CORTES computer organization_lecture_chapter3

ConceptsThe CPU (Central Processing Unit) works as a

very powerful calculator

CPUs are not very smart…just very fast at manipulating zeroes and ones

Page 5: MELJUN CORTES computer organization_lecture_chapter3

Man in the BoxVisualize the CPU as a man in a box.

He will gladly perform anything you want him to do, but he can’t see or hear anything outside the box.

How can we communicate with him?

We need some way to talk to the guy inside the box

Is anyone out there?

Page 6: MELJUN CORTES computer organization_lecture_chapter3

Talking to the ManImagine 16 lights

8 on the inside and 8 on the outsideWhen an inside light is on, the corresponding

outside light is on. We can switch these lights on and off.

This communication system is like the external data bus

Page 7: MELJUN CORTES computer organization_lecture_chapter3

Talking to the ManIn reality, a lot of little wires flash on or off

Voltage is applied or notRepresented not as on, on, off, off…

but as 1, 1, 0, 0…

On

1

Off

0

On

1

Off

0

On

1

Off

0

On

1

On

1

Page 8: MELJUN CORTES computer organization_lecture_chapter3

External Data Bus The CPU communicates with the outside world

using the external data bus (EDB)

Instead of light bulbs, the EDB is made up of tiny wires

The state of a wire is expressed in a binary format, with zeroes and ones

Each discrete setting (series of zeroes and ones representing the state of the wires) of the EDB is a line of code in a program

Page 9: MELJUN CORTES computer organization_lecture_chapter3

Registers Inside the box are registers (temporary storage

locations)

The four general-purpose registers found in all CPUs are AX, BX, CX, and DX

10000101

00110101

11001001

10100001

Page 10: MELJUN CORTES computer organization_lecture_chapter3

CodebookThe man in the box needs one more tool: the

codebook or instruction set Called machine languageOne command is a line of codeThe complete set of commands for a processor

is its instruction set

Place AX on EDBAdd AX to BX & store in AXStore next line in BXStore next line in AXMeaning

1011 0000

1000 00001001 0000

1100 0000

Instruction

Page 11: MELJUN CORTES computer organization_lecture_chapter3

Codebook (Instruction Set)

Place AX on EDBAdd AX to BX & store in AXStore next line in BXStore next line in AXMeaning

1011 0000

1000 00001001 0000

1100 0000

Instruction

Place AX on EDB1100 0000Instruction (add AX and BX and place in AX)1011 0000Data (number 2)Instruction (store data in BX)Data (number 1)Instruction (store data in AX)

1001 0000

1000 00000000 0001

0000 0010

Page 12: MELJUN CORTES computer organization_lecture_chapter3

ClockThe CPU does no work

until told to—even though data may be on the EDB

You need a buzzer to tell the man in the box to startThis is referred to as a

clockA clock is actually a

stream of pulses

zz

10000101

00110101

Time to work

10000101

00110101

Page 13: MELJUN CORTES computer organization_lecture_chapter3

Clock A clock cycle is the time taken by the special

wire to charge upThe CPU needs at least two clock cycles to act

on each commandA cycle is one complete up and down segment

of the sine wave

The maximum number of clock cycles that can be handled by the CPU is called the clock speed

Page 14: MELJUN CORTES computer organization_lecture_chapter3

System Crystal The system crystal defines the speed at which

the CPU and the rest of the PC operateQuartz oscillator, usually soldered to the

motherboard

Overheating results from overclocking the CPU (running it faster than its maximum clock speed)

Page 15: MELJUN CORTES computer organization_lecture_chapter3

In SummaryThe CPU is like a man in a boxThe external data bus gets data in and out of the

CPURegisters are used as temporary storage inside the

CPUThe instruction set is like a codebook The clock defines the speed of the CPU

10000101

00110101

11001001

10100001

Page 16: MELJUN CORTES computer organization_lecture_chapter3

Memory

Page 17: MELJUN CORTES computer organization_lecture_chapter3

Memory Memory is a device that holds binary dataMemory was first stored on paper cards and then on

magnetic cards and magnetic tapesProblems

Serial accessSlow

Random access memory (RAM) to the rescue!

Page 18: MELJUN CORTES computer organization_lecture_chapter3

RAMRAM is organized similar to a spreadsheet

Data can be read or written to by addressing the RAM location

Typically represented as KB, MB, or GB

Volatile—zeroes outwhen power lost

Page 19: MELJUN CORTES computer organization_lecture_chapter3

Memory Controller ChipThe memory controller chip (MCC) is a device

that facilitates the flow of data from the RAM to the CPU

MCC

Page 20: MELJUN CORTES computer organization_lecture_chapter3

Address Bus The address bus

enables the CPU to control the MCC

Another set of wires in addition to the external data bus

Used by the CPU to tell the Northbridge which line of code it wants from RAM

MCC

Page 21: MELJUN CORTES computer organization_lecture_chapter3

Address Bus The number of wires in the address bus

determines the maximum amount of RAM the CPU can handle

An 8088 had 20 wires, which provided 220

combinations (1,048,576 or 1 MB)

Many current CPUs use 36 wires, which provide 236 combinations (68,718,476,736 or 64 GB)

Page 22: MELJUN CORTES computer organization_lecture_chapter3

TerminologyBits are represented as b (i.e., Kb)Bytes are represented as B (i.e., KB)

240

230

220

210

1,099,511,627,776 about 1 trillion

1,073,741,824 about 1 billion

1,048,576 about 1 million

1024 about 1000

Tera

Giga

Mega

Kilo

240

230

220

210

G

K

M

T

Page 23: MELJUN CORTES computer organization_lecture_chapter3

Decimal Compared to Binary

22 21 20

4 2 1

643 Decimal102 101 100

100 10 1

6 4 3 0 1 1

101 Binary

600 + 40 + 3 643

4 + 0 + 1 + 5 Decimal

Page 24: MELJUN CORTES computer organization_lecture_chapter3

Modern CPUs

CompTIA A+Essentials

Page 25: MELJUN CORTES computer organization_lecture_chapter3

CPU OverviewSeveral specification are used to describe and

compare CPUs:Make (Intel, AMD) Model (Pentium, Athlon, etc.) Packages, or how it’s mounted (PGA, SEC, SEP)External speed (speed of crystal)Multiplier (applied to crystal)Cache (L1 and L2) Internal speed (speed when crystal multiplied)PipeliningHyper-threading

We’ll cover these in older and newer CPUs

   

Page 26: MELJUN CORTES computer organization_lecture_chapter3

ManufacturersTwo main CPU makers

IntelAMD

CPUs might look similar, but they are not interchangeable

Page 27: MELJUN CORTES computer organization_lecture_chapter3

Common CPU Packages

• Pin grid array (PGA)– Most common– Number of pins vary by processor– Plugs into sockets that vary by processor

• Single edge cartridge (SEC)– Single edge processor (SEP) is similar– Processor mounted on board– Board plugs into motherboard

• Zero insertion force (ZIF)– Allows processor to be easily inserted– Arm locks processor in place

Page 28: MELJUN CORTES computer organization_lecture_chapter3

Pentium CPU—The Early Years

CPU makers have added a large number of improvements over the yearsLarger external data busesLarger address busesFaster clock speeds

Intel introduced the Pentium CPU in the early 1990s32-bit registersSpeeds up to 300 MHzAbility to run multiple programs at onceAccess super-fast cache RAMProcesses two or more lines of code at the same

time

Page 29: MELJUN CORTES computer organization_lecture_chapter3

32-bit AddressingCurrent operating systems are referred to as

32-bit (232)Can directly address 4 GB of memory

Early Pentiums had 32-bit address bus

Newer CPUs have 36-bit address bus236 allows addressing 64 GB of RAMSome 32-bit operating systems address the

extra memory via “extensions”Memory is swapped in and out of the 4 GB base

as needed

Page 30: MELJUN CORTES computer organization_lecture_chapter3

PipeliningA pipeline is a series of steps taken by the CPU to

process a command

Pipelining is the process of processing more than one command at a time through the use of separate sets of circuitryWorks like an assembly lineCommands go through the processor on a

“conveyer belt”Enables the processor to work on more than

one thing at a time

Page 31: MELJUN CORTES computer organization_lecture_chapter3

CacheCache is separate storage

area used for quick access of data

CPU runs faster than RAM

Using a faster RAM cache close to the CPU helps the CPU run without waiting

L1: close to the CPU and fastest

L2: faster than RAM

1011 0101

1001 00011011 01100001 11011101 11011100 01111001 11111100 1010

RAM Cache

RAM

CPU

Page 32: MELJUN CORTES computer organization_lecture_chapter3

L2 Cache L2 was originally on the

motherboardReferred to as external

cacheNot uncommon on

today’s CPUs

Size of the cache varies from 0 to 1 MB

Page 33: MELJUN CORTES computer organization_lecture_chapter3

Clock Speed and Multipliers

• The clock is derived from the crystal– Referred to as external

speed

• Clock is multiplied and CPU runs at quicker speed– CPU runs at much quicker

multiplied speed• 66 MHz crystal • Sent through a 2X multiplier • Gives a 132 MHZ CPU

Original clock

Clock with 2x multiplier

Has twice as many cycles for CPU to operate with

Page 34: MELJUN CORTES computer organization_lecture_chapter3

CPU Voltages Older CPUs needed 5 volts

CPU voltage was reduced to 3.3 voltsLater improvements reduced voltage even

more with no single standardSmaller size resulted in lower voltage and

smaller chipsVoltage regulator module (VRM) is a small card

that enables a CPU to standardize voltage regulators

CPU reports voltage requirements with CPUID

Page 35: MELJUN CORTES computer organization_lecture_chapter3

Older CPUs

High-end systems

RemarksSocket 8Socket 7Socket 4, 5SocketPGAPGAPGAPackage

256 KB, 512 KB, 1 MB

L216 KB1x to 3x60–200 MHz50–66 MHz

Early Pentiums

16 KB1.5x to 2x60–150 MHz50–75 MHz

AMD K5

2.5x to 3xMultiplier

60–66 MHzExt. speed166–200 MHzInt. speed

16 KBL1

Pentium Pro

Page 36: MELJUN CORTES computer organization_lecture_chapter3

ImprovementsOut-of-order processing

Enabled processors to predict data that was needed

90% accuracy in pulling the correct data

On-chip L2 cacheOn the same package, but not necessarily on

the same chip

Page 37: MELJUN CORTES computer organization_lecture_chapter3

Bus TypesFrontside bus

Address bus and external data bus are combined together between the CPU, MCC, and RAM

Backside busConnection between the CPU and L2 cache

Remember that L2 cache used to be external cache but is now internal to the CPU housing

CPU

L2 CacheRAMMCC

Frontside bus

Backside bus

Page 38: MELJUN CORTES computer organization_lecture_chapter3

Older CPUs

AMD & Intel Split

RemarksSocket 7Slot 1Socket 7SocketPGASECPGAPackage0 to 256 KB512 KBL2

32 KB2.5x to 4.5x166–200 MHz66–75 MHz

Later Pentiums

32 KB3.5x to 4.5x233–450 MHz66–100 MHz

Pentium II

3.5x to 5.5xMultiplier

60–100 MHzExt. speed200– 550 MHzInt. speed

32 or 64 KBL1

AMD K6

Page 39: MELJUN CORTES computer organization_lecture_chapter3

Pentium Improvements MMX (multimedia extensions)

Designed for graphical applications

Increased clocks and multipliersUp to 4.5x

Pentium IIFaster than Pentium Pro Used SEC

AMD K6Proprietary 3DNow!Requires a Super Socket 7

Page 40: MELJUN CORTES computer organization_lecture_chapter3

Older CPUs

Slot A7Slot 1, Socket 370

Slot 1, Socket 370

SocketSECSEC-2, PGASEP, PGAPackage512 KB256–512 KB0 to 128 KBL2

32 KB4x to 10.5x

266–700 MHz66 MHz

Intel Celeron (P II)

32 KB4x to 10x

450 MHz–1.2 GHz

100–133 MHz

Pentium III

5x to 10xMultiplier

100–133 MHzExt. speed500MHz–1GHz

Int. speed

128 KBL1

AMD Athlons

Page 41: MELJUN CORTES computer organization_lecture_chapter3

Older CPUs Celeron

Offshoot of Pentium II for the low-end PC

Pentium IIIIntel’s answer to 3DNow!

by AMD

AMD AthlonSEC package used slot A

Page 42: MELJUN CORTES computer organization_lecture_chapter3

More Current CPUs

49–10021–5738–75Wattage180 nm180 nm180 nmProcessWillametteThunderbirdCodename

Socket 423 or 478Socket ASocket ASocketPGAPGAPGAPackage256 KB64 KB256 KBL2

128 KB6.5x to 14x

650 MHz–1.4 GHz

100–133 MHz

AMD Athlon

128 KB6.5x to 13.5x

650 MHz–1.8 GHz

100 MHz

AMD Duron

13x to 20xMultiplier

100–133 MHzExt. speed1.3–2 GHzInt. speed

128 KBL1

Pentium 4

Page 43: MELJUN CORTES computer organization_lecture_chapter3

IT Technician

Processing and Wattage

CompTIA A+Technician

Page 44: MELJUN CORTES computer organization_lecture_chapter3

Processing and WattageWattage is a measure of power

Goal is to consume as little power as possiblewhile still having a powerful CPU

Solution: make it smaller so it takes less voltage;less voltage is less wattage

ProcessingMeasures thickness of wafersSome of today’s processors are 65 nanometers

About as thick as 455 hydrogen atomsOr 1/3077th of the width of a human hair

Hydrogen atom

Page 45: MELJUN CORTES computer organization_lecture_chapter3

Pentium CompetitorsAMD Athlon Thunderbird

Double-pumped frontside bus doubled the data rate without increasing the clock speed

Returned to PGA with Socket A

AMD DuronGeneric name given to all lower-end Athlon processorsAMD’s competitor to Intel’s Celeron for the low-end PC

Intel Pentium 4 (Willamette)Completely redesigned core called NetBurstUsed 20-step pipeline Quad-pumped frontside bus

Page 46: MELJUN CORTES computer organization_lecture_chapter3

More Current CPUs

49–7060–72Wattage150 nm180 nmProcessThoroughbredPalominoCodename

Socket ASocket ASocketPGAPGAPackage256–512 KB256–512 KBL2

128 KB13x to 16.5x1.3–2.2 GHz133 MHz

AMD Athlon

128 KB13x to 16.5x1.3–2.2 GHz166 MHz

AMD Athlon

Multiplier

Ext. speedInt. speed

L1

Page 47: MELJUN CORTES computer organization_lecture_chapter3

More Current CPUs

86~8445–68Wattage65 nm90 nm130 nmProcessCedar MillPrescottNorthwoodCodename

Socket 478 or 775Socket 478 or 775

Socket 478 or 775

SocketPGAPGAPGAPackage256, 512 KB256, 512 KB256, 512 KBL2

128 KB13x to 23x1.3–3.8 GHz100 MHz

Pentium 4

128 KB13x to 23x1.3–3.8 GHz133 MHz

Pentium 4

13x to 23xMultiplier

200 MHzExt. speed1.3–3.8 GHzInt. speed

128 KBL1

Pentium 4

Page 48: MELJUN CORTES computer organization_lecture_chapter3

Newer Processors

AMD Athlon XP (Palomino and Thoroughbred)Enhanced version of the Athlon core processor

Intel Pentium 4 (Northwood, Prescott, Cedar Mill)Increased frontside bus to 800 MHzIntroduced hyperthreading

HyperthreadingLooks like two CPUs

to the operating system

Page 49: MELJUN CORTES computer organization_lecture_chapter3

More Current CPUs

49–7060–72Wattage150 nm180 nmProcessThoroughbredPalominoCodename

Socket ASocket ASocketPGAPGAPackage256–512 KB256–512 KBL2

128 KB13x to 16.5x1.3–2.2 GHz133 MHz

AMD Athlon XP

128 KB13x to 16.5x1.3–2.2 GHz166 MHz

AMD Athlon

Multiplier

Ext. speedInt. speed

L1

Page 50: MELJUN CORTES computer organization_lecture_chapter3

More Current CPUs

2 MBL3

85–11560–70Wattage130, 90 nm130 nmProcessExtreme EditionThorton/BartonCodename

Socket 478 or 775Socket ASocketPGAPGAPackage

512 KB256, 512 KBL2128 KB10x to 16x1.6–2.2 GHz133, 166, 200 MHz

Athlon XP

14x to 17xMultiplier

200, 266 MHzExt. speed3.2–3.7 GHzInt. speed

128 KBL1

Pentium 4

Page 51: MELJUN CORTES computer organization_lecture_chapter3

Mobile ProcessorsMobile processors

For laptopsUse less power to overcome problems of heat

and power requirements

Utilize throttlingPreviously called system management mode

(SMM)Allows a CPU to slow down during low demand

timesIntel calls it SpeedStepAMD calls it PowerNow!

Page 52: MELJUN CORTES computer organization_lecture_chapter3

More Processors Intel Xeon processors

Series of powerful CPUsMassive L2 cachesXeon is codeword for high-endCan easily be used in symmetric multiprocessing

systems (multiple physical processors)Early Xeon used slotsLater Xeons went back to PGA packages

Page 53: MELJUN CORTES computer organization_lecture_chapter3

64-Bit Processors64-bit processing refers to a 64-bit address

busWe already had 64-bit external data buses

Intel Itanium processorsItanium was Intel’s first 64-bit chipItanium II is made for the PC

Page 54: MELJUN CORTES computer organization_lecture_chapter3

64-Bit ProcessorsAMD Opteron processor

Runs both 32-bit and 64-bit code

Athlon 64First desktop 64-bit processorBackward-compatible with 32-bit programsTwo main groups (130 nm and 90 nm)

AMD Sempron CPUsLess cache than the Athlon 64Offer a tradeoff between price and performance

Page 55: MELJUN CORTES computer organization_lecture_chapter3

Dual-core CPUsDue to practical limit of ~4 GHz in clock

speeds, alternatives were sought

Dual core features two CPUs on same chip

Pentium DAthlon Dual Cores

Page 56: MELJUN CORTES computer organization_lecture_chapter3

Dual-core CPUs

89–11095–130Wattage90 nm90, 65 nmProcess

Smtihfield/PreslerCodename

Socket 939 or AM2Socket LGA 775SocketPGA775 LGAPackageTwo 512 KB or 1 MBTwo 1 or 2 MBL2

Two 128 KB14x to 20x2.6–3.6 GHz166, 200 MHz

Pentium D

10x to 12xMultiplier

200 MHzExt. speed2–2.4 GHzInt. speed

128 KBL1

Athlon Dual Core

Page 57: MELJUN CORTES computer organization_lecture_chapter3

Intel Core CPUs

89–11095–130Wattage90 nm90, 65 nmProcess

YonahCodename

Socket 939 or AM2Socket LGA 775SocketPGA775 LGAPackageTwo 512 KB or 1 MBTwo 1 or 2 MBL2

Two 128 KB14x to 20x2.6–3.6 GHz166, 200 MHz

Intel Core

10x to 12xMultiplier

200 MHzExt. speed2–2.4 GHzInt. speed

128 KBL1

Intel Core 2

Page 58: MELJUN CORTES computer organization_lecture_chapter3

Installing CPUs

Page 59: MELJUN CORTES computer organization_lecture_chapter3

Why Replace a CPU?Cost

Chances are you’ll need to replace the motherboard as well as the CPU—is it worth it?

CoolingFaster CPUs will probably need better cooling

PerformanceFaster CPUs may not be the best answer to

speeding up your PCMany times you really need more RAM

Page 60: MELJUN CORTES computer organization_lecture_chapter3

The Right CPUConsult your motherboard manual

You need a CPU that will fit in the socket or slot on your motherboard

Buying a CPUMost stores will not accept

returnsRetail-boxed CPUs are genuine and come

with a fanLots of illegal CPUs on the market

Page 61: MELJUN CORTES computer organization_lecture_chapter3

CPU Installation Guidelines

Don’t touch the pins (ESD)

Match the notch and dot printed on the corners of the CPU…they must line upIncorrectly installing

your CPU may destroy the CPU and/or motherboard!

Page 62: MELJUN CORTES computer organization_lecture_chapter3

CPU Installation Guidelines

Use a heat sink compound

Install a fan on top of the CPU after the CPU has been inserted into the socket

Page 63: MELJUN CORTES computer organization_lecture_chapter3

Plugging in the CPU Fan

Page 64: MELJUN CORTES computer organization_lecture_chapter3

The Art of CoolingModern CPUs need to be

kept coolOEM fans are included in

retail-boxed CPUs

Specialized fans usually exceed OEM fans

Liquid cooling works by running a liquid (usually water) through a metal block that sits on top of your CPU to absorb heat

Page 65: MELJUN CORTES computer organization_lecture_chapter3

OverclockingOverclocking is running a CPU at a speed

higher than ratedVoids the warrantyBlack market exists

Page 66: MELJUN CORTES computer organization_lecture_chapter3