how computer processors work

7
How Computer Processors Work Written by Matthew Elton (Copyright 2006 Matthew Elton) The processor, (also known as a microprocessor or a CPU, which stands for Central Processing Unit), does all of the computing a computer does. In other words, it is like the computer’s brain. Not the part of the brain where memory is stored, that would be the hard drive and RAM, but the part of the brain which does the thinking. The picture above shows a slot 1 processor. The silver metal strips on the side of the processor are heatsinks. These draw heat away from the processor to prevent it from overheating and melting. A fan is also attached to the processor to prevent it from overheating too. Below is a picture of a slot 1 processor without the heatsinks and fan, being inserted into a motherboard connection. Slot 1 processors have the microprocessor and cache memory attached to a circuit-board which is enclosed in a plastic shell which protects the processor.

Upload: jedi-ninja

Post on 15-Oct-2014

10.420 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: How Computer Processors Work

How Computer Processors Work

Written by Matthew Elton

(Copyright 2006 Matthew Elton)

The processor, (also known as a microprocessor or a CPU, which stands for Central Processing Unit), does all of the computing a computer does.  In other words, it is like the computer’s brain.  Not the part of the brain where memory is stored, that would be the hard drive and RAM, but the part of the brain which does the thinking.  The picture above shows a slot 1 processor.  The silver metal strips on the side of the processor are heatsinks.  These draw heat away from the processor to prevent it from overheating and melting.  A fan is also attached to the processor to prevent it from overheating too. Below is a picture of a slot 1 processor without the heatsinks and fan, being inserted into a motherboard connection. Slot 1 processors have the microprocessor and cache memory attached to a circuit-board which is enclosed in a plastic shell which protects the processor.

The slot 1 processor card seen in the above picture contains the central processing unit, also known as the Central Processing Unit, with its level 1 cache memory. The central processing unit also contains the control unit and the arithmetic/logic unit, both working together to process the computer's commands. The control unit controls the flow of data, in the form of electrical pulses, inside the processor. It gets it instructions in the form of code, made up of binary code (positive and negative charges or pulses of electricity that

Page 2: How Computer Processors Work

re represented by 1s and 0s) in the memory and translates the code into commands that the computer can understand. The arithmetic/logic unit handles all of the mathematical calculations and logical comparisons. It takes the commands from the control unit and performs them, storing the results back into memory. These four steps, (fetch, decode, execute, and store), are what's called the "machine cycle" of a computer; they are the four basic steps to how the computer runs each and every program and process. The microprocessor's level 1 cache memory is memory that is located inside the Central Processing Unit itself. It stores the most frequently used data. The Central Processing Unit can access the cache memory much faster than having to access the RAM, also known as Random Access Memory, because the cache memory is right inside the Central Processing Unit and the RAM is outside the Central Processing Unit. Below is a photo of what's inside of a Pentium 3 processor. The control unit, arithmetic/logic unit, and level 1 cache are located inside the center Central Processing Unit chip. Level 2 cache memory is on the right side of the processor chip.

Level 1 cache memory is memory that is located the Central Processing Unit itself. It is often smaller and faster than level 2 cache memory. Level 2 cache memory is memory located between the RAM (Random Access Memory) and Central Processing Unit.  Level 2 cache memory is used when the level 1 cache memory is full or is too small to hold the data. The picture above shows level 2 cache memory on the processor card, but not in the Central Processing Unit.  The level 2 cache memory on this processor is located beside the Central Processing Unit. Below are two photographs of a Central Processing Unit. The photograph on the bottom is a view of the top of the Central Processing Unit chip from the outside. The photo on the top is a map of the inside of the Central Processing Unit, showing the different parts of the processor do. The pipelined floating point area, logic areas, and superscalar integer execution units are part of the arithmetic/logic unit.

Page 3: How Computer Processors Work

At the top of the processor map you can also see the clock driver. The clock driver is what times sets the pace for the computer. The clock's speed is how the speed of processors is rated. Each “machine cycle” consists of two paces, set by the clock driver.  On each beat of the clock driver the control unit decodes data, which is called the "instruction cycle” of the processor. At the same time the arithmetic/logic unit computes and stores data, which is called the "execution cycle” of the processor.  The speed of the clock driver is rated by how many beats per second it does.  One million beats per second is called a megahertz, which is abbreviated as MHz.  One billion beats per second is

Page 4: How Computer Processors Work

called a gigahertz, which is abbreviated GHz.  For every beat of the clock driver, a machine cycle is completed.  The best processors available today can perform at 3 GHz or faster!  That’s three billion (3,000,000,000) instructions completed every second!  This might sound like a lot, and it is, but a computer needs to compute this much data to run properly.  Every single little thing the computer has to do to make each of its processes (in Windows, a minimum of 20-50 processes are constantly running at the same time) run correctly.  Each process could consist of thousands of instructions that must be completed.

Slot 1 processors are not used much anymore.  They have been replaced by faster types of processors, such as socket939 processors and socket775 processors.  Below are two pictures of an AMD Athlon 64 FX socket 939 processor and one picture of a Pentium 4 Extreme Edition socket 775 processor. These are more modern processors than the slot 1 processors in the pictures above.  AMD and Intel are the two largest companies making processors.  The way in which the processor connects to the motherboard is its socket type, or slot type.  AMD makes socket 939, socket 940, and socket 754 type processors. Intel uses the socket 775 and socket 478 socket types for their Pentium processors. All of these processors look similar, but they do have some slight differences, such as the number of pins they have.  Pins, also known as contact points, are tiny little pieces of metal that connect the processor to the motherboard.  Modern processors have hundreds or even thousands of pins.  The more pins there are the more routes data (in the form of positive and negative electrical pulses or charges represented by 1s and 0s in binary code) has to enter and exit the processor.  The more routes data has to enter and exit the processor, the more data can flow in and out of the processor, and the faster the processor runs.  Another difference in some of the newer processors is that the level 2 cache memory is located directly on the Central Processing Unit. Any cache memory located outside of a Central Processing Unit with level 2 cache memory inside it is called level 3 cache memory.  The level 3 cache memory operates the same way the level 2 cache memory does. Level 1 cache memory is still located closest to the core of the Central Processing Unit and is still smaller and faster than the level 2 cache memory. Some of the newest processors even have level 3 cache memory located directly on the Central Processing Unit itself; with any cache memory located outside of a Central Processing Unit called level 4 cache memory.  With any processor, the higher the cache memory number, the farther away from the core of the Central Processing Unit it is, and the lower the number the closer to the core of the Central Processing Unit it is.  Usually, the higher the cache memory number, the larger and slower the memory is, and the lower the cache memory number, the smaller and faster it is.  The first picture below shows the front and back of a Pentium 4 Extreme Edition socket 775 processor, which has levels 1, 2, and 3 of cache memory located inside the Central Processing Unit.  The second picture below shows the front and back of an AMD Athlon 64 FX socket 939 processor, which has levels 1 and 2 of cache memory located inside the Central Processing Unit. The third photo below shows the AMD processor correctly installed on a motherboard with a heatsink and fan attached to prevent the processor from overheating and melting, since processors get extremely hot when hey run because tons of electricity is constantly flowing through them.  Processors are often as hot as a frying pan!  The heatsink and fan prevent the processor from getting any hotter than this, because, if the processor gets too

Page 5: How Computer Processors Work

hot, it will start to melt, or “chip.”  Chipping is when parts of the processor are forced apart by extreme heat.  This ruins the processor.

On the first two processors below you can see the top of the processor on the left, and the bottom, the part which connects to the motherboard, on the right.  See all those little gold dots on the bottom of the processor?  Those are pins, also known as contact points.  They are tiny wires or small strips of metal which connect the processor to the motherboard.