0% found this document useful (0 votes)
94 views32 pages

Lesson 7 The Central Processing Unit (CPU)

The CPU, or central processing unit, is the brain of the computer that executes programs and instructions. It follows the Von Neumann architecture of storing both data and programs in memory. The CPU fetches instructions from memory and executes them in three steps: fetch, decode, and execute. Modern CPUs improve performance through parallelization techniques like pipelining, superscalar execution, and multi-core processors. The fastest supercomputer in the world is the Sunway TaihuLight in China, which has over 10 million cores running at nearly 1.5 GHz each.

Uploaded by

Just Me
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views32 pages

Lesson 7 The Central Processing Unit (CPU)

The CPU, or central processing unit, is the brain of the computer that executes programs and instructions. It follows the Von Neumann architecture of storing both data and programs in memory. The CPU fetches instructions from memory and executes them in three steps: fetch, decode, and execute. Modern CPUs improve performance through parallelization techniques like pipelining, superscalar execution, and multi-core processors. The fastest supercomputer in the world is the Sunway TaihuLight in China, which has over 10 million cores running at nearly 1.5 GHz each.

Uploaded by

Just Me
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

LESSON 7: THE CENTRAL

PROCESSING UNIT (CPU)


CPU
CENTRAL PROCESSING UNIT(CPU)
• The heart of any computer. It's job is to execute programs. Programs like Microsoft Office,
Google Chrome, Notepad, etc.

• Programs - are series of individual operations called instructions which instructs the computer
what to do.
VON NEUMANN ARCHITECTURE
• The unifying of program and data into a single shared memory.
• It was named after John Von Neumann, a prominent mathematician-physicist who worked
on the Manhattan project and several early electronic computers.
• The hallmarks of a Von Neumann computer are a processing unit containing an arithmetic
logic unit, data registers, an instructional register, and instruction address register. And
finally, a memory to store both data and instructions.
• The very first Von Neumann Architecture stored program computer was constructed in 1948,
by the University of Manchester, nicknamed 'Baby', and even the computer you’re using
right now uses the same architecture.
VON NEUMANN ARCHITECTURE
INSTRUCTION REGISTER
• The register responsible for storing the current instruction to be executed.
INSTRUCTION ADDRESS REGISTER
• The register responsible for tracking which part of the program we are currently in, by
storing the memory address of the current instruction to be executed.
CONTROL UNIT
• A circuit or combination of logic gates responsible for decoding and interpreting computer
instructions. It is the one that directs or configures all the different parts of the CPU.
CPU'S OPERATIONS
• Fetch - the first phase of a CPU's operation. It is the phase where the CPU retrieves an
instruction from the RAM or Register to be copied into the instruction register.
• Decode - the second phase of a CPU's operation. It is the phase where the CPU determines
what operation it will execute base on the given op-code.
• Execute - the third and final phase of a CPU's operation. It is the phase where the
instruction will be executed. Instructions like moving a value from RAM into Register B
(e.g. LOAD_B 0001).
KINDLY PLAY THE VIDEO.
CLOCK
• The component responsible for keeping the CPU ticking. The clock triggers an electrical
signal at a precise and regular interval. Its signal is used by the Control Unit to advance the
internal operation of the CPU, keeping everything in lock-step.

• Clock Speed - the speed at which a CPU can carry out each step of the fetch-decode-execute
cycle. This speed is measured in Hertz - a unit of frequency. One Hertz means one cycle per
second.
THIS ONE
OVERCLOCKING
• Or modifying the clock to speed up the tempo of the CPU. Chip makers often design CPUs
with enough tolerance to handle a little bit of overclocking, but too much can either overheat
the CPU, or produce gobbledygook as the signals fall behind the clock.
UNDERCLOCKING
• The opposite of overclocking, meaning it slows down the clock speed of your computer
which is very useful. Because sometimes it’s not necessary to run the processor at full speed
like when you are not running a particularly demanding program. By slowing the CPU
down, you can save a lot of power, which is important for computers that run on batteries,
like laptops and smartphones.
DYNAMIC FREQUENCY SCALING
• A feature which is present in many modern processors which can increase or decrease their
clock speed based on demand.
INTEL 4004
• The very first single-chip CPU released in 1971.
• It was a 4-bit CPU with a clock speed of 740 Kilohertz or 740 thousand cycles per second.
• It supported 46 instructions. Which was enough to build an entire working computer.
• It used many of the instructions like JUMP, ADD, SUBTRACT, and LOAD.
• It also uses 8-bit immediate values, for things like JUMPs, in order to address more memory.
MODERN CPU’S TWO STRATEGIES
TO SUPPORT MORE INSTRUCTIONS.
• Instruction length - a straightforward approach that uses more bits, like 32 or 64 bits to
have more instructions.
• Variable length - an approach where the CPU just executes the instructions immediately if
the instruction has no extra values. But if it sees something like a JUMP instruction, it knows
it must also fetch the address to jump to, which is saved immediately behind the JUMP
instruction in memory. This is called an Immediate Value. In such processor designs,
instructions can be any number of bytes long, which makes the fetch cycle of the CPU more
complicated.
CACHE
• A little piece of RAM inside the CPU which usually sized just some kilobytes or megabytes.
Having a cache speeds things up in a clever way. When the CPU requests a memory location
from RAM, the RAM can transmit not just one single value, but a whole block of data. This
takes only a little bit more time than transmitting a single value, but it allows this data block
to be saved into the cache. This tends to be really useful because computer data is often
arranged and processed sequentially. The cache can also be used like a scratch space, storing
intermediate values when performing a longer, or more complicated calculation.
CACHE
• Cache hit - a state when the data requested in RAM is already stored in the cache.
• Cache miss - a state when the data requested isn’t in the cache, so you have to go to RAM.
• Dirty bit - a special flag for each block of memory the cache stores. It was called a dirty bit
when the old data is not matched with the new data produced from some kind of calculation
done by an application. So before the cache erases the old block to free up space, it checks
its dirty bit, and if it’s dirty, the old block of data is written back to RAM before loading in
the new block so the data is synced.
INSTRUCTION PIPELINING
• A trick of a CPU's to boost it's performance. What it does is it parallelize its operations by
simultaneously doing the fetch-decode-execute operation in just one cycle. While one
instruction is getting executed, the next instruction could be getting decoded, and the
instruction beyond that fetched from memory. All of these separate processes can overlap so
that all parts of the CPU are active at any given time. In this pipelined design, an instruction
is executed every single clock cycle which triples the throughput.

• Superscalar processors - a type of processor which can execute more than one instruction
per clock cycle.
PARALLELIZE

UNPARALLELIZE
MULTI-CORE PROCESSORS
• Another way to increase performance is to run several streams of instructions at once with
multi-core processors. You might have heard of dual core or quad core processors. This
means there are multiple independent processing units inside of a single CPU chip. In many
ways, this is very much like having multiple separate CPUs, but because they’re tightly
integrated, they can share some resources, like cache, allowing the cores to work together on
shared computations. But, when more cores just isn’t enough, you can build computers with
multiple independent CPUs! High end computers, like the servers streaming video from
YouTube’s data center, often need the extra horsepower to keep it silky smooth for the
hundreds of people watching simultaneously.
THE SUNWAY TAIHULIGHT
• The world’s fastest computer located in The National Supercomputing Center in Wuxi,
China.
• It has 40,960 CPUs, each with 256 cores which is over ten million cores in total and each
core runs at 1.45 gigahertz.
• In total, this machine can process 93 Quadrillion -- that’s 93 million-billions -- floating point
math operations per second, known as FLOPS.
END OF PRESENTATION

You might also like