cpu the central processing unit. cpu ● it just processes data, be it: searching sorting...
TRANSCRIPT
CPU
The Central Processing Unit
CPU
● It just processes data, be it:SearchingSortingCalculatingDecision making
● Needed for everything you do on a computer
First
● OS loads everything into memory (RAM).ProgramData
Fetch
● CPU gets data and instructions (program) from main memory (RAM) and stores in it’s own memory (Registers)
Decode
● Instructions are worked out by the CPUo Different CPUs have different instruction
sets● CPU gets ready to do the instructions
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
A “borrowed” diagram is worth 1000 words…
What is inside a CPU?
Control Unit
● Controls input and output of data● Controls flow of data inside CPU
o Organises the fetch/execute cycle
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
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?)
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
Faster always better?
● Heat● Power● Performance● Architecture
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?)
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
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.