cpu the central processing unit. cpu ● it just processes data, be it: searching sorting...

16
CPU The Central Processing Unit

Upload: sheila-crawford

Post on 31-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

CPU

The Central Processing Unit

Page 2: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

CPU

● It just processes data, be it:SearchingSortingCalculatingDecision making

● Needed for everything you do on a computer

Page 3: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

First

● OS loads everything into memory (RAM).ProgramData

Page 4: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Fetch

● CPU gets data and instructions (program) from main memory (RAM) and stores in it’s own memory (Registers)

Page 5: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Decode

● Instructions are worked out by the CPUo Different CPUs have different instruction

sets● CPU gets ready to do the instructions

Page 6: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Execute

● Instruction is carried out on the data in the CPU’s registers

● Result is stored in another Register● Then CPU is ready for another fetch

Page 7: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

A “borrowed” diagram is worth 1000 words…

Page 8: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

What is inside a CPU?

Page 9: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Control Unit

● Controls input and output of data● Controls flow of data inside CPU

o Organises the fetch/execute cycle

Page 10: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Immediate Access Store

● The internal registers.● Only holds the data needed for the● instructions

● Hard drives are very slow but holds loads of data

● RAM is slow, and holds a middle amount of data● IAS is very fast, but holds tiny amount of data

Page 11: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Arithmetic & Logical Unit

● Processes data by manipulating or changing it.

● Arithmetic partPerforms calculations (1+1=2)

● Logical unitPerforms logical operations and comparisons (is 1 < 3?)

Page 12: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Clock speed

● A CPU can only ever do one thing at once.o So how can you run Word while listening to

iTunes?● Each cycle of the fetch/execute is one

instruction● 1 cycle per second is a hertz (Hz)● 1GHz = 1 000 000 000 instructions per second● Faster CPU means less time for each

instruction to complete

Page 13: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Faster always better?

● Heat● Power● Performance● Architecture

Page 14: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Number of cores

● Dual core means two processorso Can do twice as much in a second than

just one processor… in theoryo Improved performance (but not doubled?)

Page 15: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Cache

● No point having a fast processor if there’s no data for it to process.

● The more cache the more data can be stored closer to the CPU on fast memory

● If data isn’t in cache the CPU will look at the ram, but this is really slow so takes lots of time

Page 16: CPU The Central Processing Unit. CPU ● It just processes data, be it: Searching Sorting Calculating Decision making ● Needed for everything you do on

Questions

1. My laptop has a Intel Core i3 running at 2ghz, it’s faster than your school desktops. Explain.2. Describe the considerations in picking a laptop’s CPU.3. Describe the considerations in picking a server’s CPU.4. Which is the fastest i7 3 ghz pentium or am i5 AMD 2.3gHZ.