Monday, October 6, 2014

CPU Notes

CPU (CENTRAL PROCESSING UNIT) WORKBOOK




THE PURPOSE OF THE CPU


This is often described as the brain of the computer. The purpose of the CPU is to process data. It is where all the searching, sorting, calculating and decision making takes place in the computer.


FETCH, DECODE, EXECUTE CYCLE


The CPU will fetch the data, instructions for a program from the main memory which is called RAM or Random Access memory. This is then stored within the CPU’s own memory reserve which is a lot smaller than RAM. This is called the Registers within the CPU. This is the FETCH part of the cycle.


These internal memory areas are collectively called the Registers but it can be divided into 4 different parts. These are called:
PC - Program Counter
CIR - Current Instruction Register
MAR - Memory Address Register
MDR - Memory Data Register


The CPU will place the address of the next item to be fetched in the address bus which his vital hardware path.


After this the data then moves from the main memory into the cpu by travelling along a bus called the data bus.


The next step in this system is the DECODE part of the cycle, this is where the CPU will make sense of the instruction.


The CPU has to understand a specific set of commands which differ between each CPU, this is called the instruction set.


after the DECODE has happened the CPU will prepare various areas for the next step in the process. After this is CPU will now start the EXECUTE part of the cycle where the data is finally processed, this means the instructions are actually carried out.


The cycle then starts again.


fetch_decode_execute_cycle.jpg< Diagram of the cycle.


THE CONTROL UNIT


parts_of_a_cpu.jpg
The three main jobs of the control unit is to control data flow within the processor, it controls the fetch execute cycle I wrote about earlier.
It will monitor the hardware within a system to make sure the commands are given to them and output correctly. it keeps everything in check.
It will control and is in charge of the specific inputs and outputs of a system so that they go to the right place at the right time.

THE IMMEDIATE ACCESS STORE (IAS)


The cpu will use the IAS as a temporary storage place for read data from the backing storage.


The main reason for an IAS is so that applications are able to run more directly as they are too slow from Backing storage (Hard drive). Basicly applications to run fast enough need to be in a quicker form and closer to the ALU etc.


ARITHMETIC LOGIC UNIT (ALU)


The ALU can be split up into a couple of different parts, the first being the Arithmetic part.
This does exactly what it says on the tin, performs the calculations on the data like adding, subtracting multiplying etc.
The other part being the Logic part which deals with, you guessed it, logic and comparisons.
so it will work out if one value is greater than another or equal etc etc.


CLOCK SPEED


A computer can only process a certain amount of instructions at a time, This depends on the amount of cores a cpu has, the more cores the more tasks it can do at once.


Clock speed is essentially the speed of a processor, it’s basically controlled by a quartz clock within the cpu. Its all measured in cycles per second, so one clock is one Hertz.


Most CPUs will run at 3GHz or more which is three thousand million cycles a second. This means the CPU can do roughly 3 billion instructions a second.


The more clock speed a CPU has the faster it will run, which means there will be a boost in performance. The downside of the this is the heat it generates which means you need a bigger air cooler or go water cooling.


“Overclocking” is when you get the most performance out of your CPU by increasing the clock speed to run faster than it was designed for. This means you need to get bigger cooling systems that what is typically found in a computer system. Some people will resort to watercooling their systems to keep temperatures down and noise down.


NUMBER OF CORES


When a CPU has “dual core” or “quad cores” it means that it has ‘parallel’ processing so basicly depending on the amount of cores, multiple instructions can be processed at the same time as there are multiple ALUs etc.


THE CACHE


The order the CPU will take to look at different storage areas it can access is as follows:
  1. CACHE
  2. RAM
  3. HARD DISK/SSD/HYBRID
this access this in that order as it gets larger in size as it goes down the list, and increases in speed as it goes up that list.


The CACHE is known as volatile memory as the cache will clear itself out when the computer is not powered. any data that was on the cache will be cleared, and the data will be gone.


The larger the CACHE is the faster a computer system will perform but specifically to the CPU it will mean there is more data to store for quicker access which means the computer will perform faster.

CACHE is the faster a computer system will perform but specifically to the CPU it will mean there is more data to store for quicker access which means the computer will perform faster.

No comments:

Post a Comment