CPU Computing hardware. Candidates should be a) State the purpose of the CPU b) Describe the...
-
Upload
rodney-burns -
Category
Documents
-
view
216 -
download
0
Transcript of CPU Computing hardware. Candidates should be a) State the purpose of the CPU b) Describe the...
CPU
Computing hardware
Candidates should be
a) State the purpose of the CPUb) Describe the function of the CPU as fetching
and executing instructions stored in memory
c) Explain how common characteristics of CPUs such as clock speed, cache size and number of cores affect their performance
CPU
• The CPU is sometimes referred to as the brain of the computer. However, unlike the human brain it cannot think for itself. It requires humans to supply programs and data before it can process.
• It is where all the searching, sorting, calculations and decision making takes place.
• A typical CPU consists of three main elements:- Control unit: responsible for co-ordinating the input
and output devices and all related activities.- Immediate Access Store (IAS)- Arithmetic and logic unit (ALU): calculations are done
here and logical devices are made.
Control Unit
It controls and monitors the hardware attached to the system to ensure the commands given to it by the application software are used
It acts under the direction of the clock, and ensures that all the data goes to and from the correct places in memory
It instructs the ALU as to what arithmetic calculation to perform
Control Unit
The Immediate Access Store
This holds the data and programs needed at that instant by the Control Unit
The CPU reads data and programs kept on the backing storage and stores them temporarily in the IAS’s memory
CPU needs to do this because Backing Storage (e.g. hard disk) is much too slow to be able to run applications directly
So data and programs are first loaded into main memory then the CPU fetches just the part it immediately needs and loads it into its own internal registers as part of the Fetch-Execute Cycle
The Immediate Access Store
This holds the data and programs needed at that instant by the Control Unit
The CPU reads data and programs kept on the backing storage and stores them temporarily in the IAS’s memory
CPU needs to do this because Backing Storage (e.g. hard disk) is much too slow to be able to run applications directly
So data and programs are first loaded into main memory then the CPU fetches just the part it immediately needs and loads it into its own internal registers as part of the Fetch-Execute Cycle
The Arithmetic and Logic Unit
This is where all the calculations take place within a computer system
The computer processed data either by manipulating it or acting upon it
There are basically two operations which can be performed Arithmetic part - Basic mathematical operations (+, -,
*, /) Logic part – Comparisons, works out if one value is
greater, less than or equal to another( < or >)
The fetch-decode-execute cycle
This describes the steps needed for processing to take place. Sometimes called Fetch-Execute Cycle
Operating system loads the data and the program into main memory (RAM)
Fetch
CPU fetches some data and instructions (program) from the main memory and stores them in its internal temporary memory areas called ‘registers’
For this to happen, the CPU makes use of a vital hardware path called the ‘address bus’
CPU places the address of the next item to be fetched on to the address bus
Data from this address moves from main memory into the CPU travelling along another hardware path called ‘data bus’
Decode
The CPU must make sense of the instructions it has just fetched. This process is called ‘decode’
CPU is designed to understand a specific set of commands called the ‘instruction set’ of the CPU. Each make of CPU has a different instruction set
CPU decodes the instructions and prepares various areas within the chip in readiness of the next step
Execute
This is the part of the cycle where data processing actually takes place
The instruction is carried out upon the data (executed). The result of this process is stored in yet another register
Once the execute stage is complete, the CPU sets itself up to begin another cycle once more
Clock speed
Computers can only process one instruction at a time. It happens so fast that it appears as though many things are happening simultaneously
The amount of time it has to process one piece of data is controlled by a quartz clock inside the CPU
CPU clock speed is measured in cycles per second. 1 cycle per second is also known as 1 Hertz
A computer running at 1GHz can carry out a thousand million instructions per second
Clock speed cont.
Clock speed higher Faster performance but runs hotter and consumes
more powerClock speed lower
Lower performance, less costly, needs less power so good for battery life in laptops
Overclocking - Adjusting the clock to run faster than the CPU was designed for. This makes the CPU run hotter and so extra cooling fans also have to be purchased
Number of cores
If the clock cannot be sped up any more, how would you improve performance?
Using two CPUs at the same time means the job in hand is shared between the two CPUs
But many applications have not been written to take advantage of extra processors
A modern processing device may contain two or even four CPUs. These CPUs are often called ‘cores’. So a dual-core device means it contains two CPUs and a quad-core contains four
The Cache
Most data is stored on the hard disk, when we use the data it is loaded into RAM because it is much faster to access from RAM than from the hard disk
Data can be stored as close as possible to the CPU to avoid delays. This nearby storage area is called the ‘cache’
It can be accessed much faster than RAM. CPU looks in the cache for the data it needs. If it is there it will retrieve it and process it. If not, the CPU accesses the system memory and then puts a copy of the new data in the cache before processing it
The Cache
Cache cont.
Cache memory is volatile i.e. when computer is shut down, the data stored there is lost
To improve computer performance, it is important to keep the local cache full at all times so that the CPU doesn’t have to wait around with nothing to do
The larger the cache size, the better the performance as you are able to store more data locally
Summary
The purpose of a CPU is to: Control movement of data & instructions Fetch data and instructions from memory Decode and execute instructions Perform arithmetic & logical calculations
The performance of the CPU depends upon the: Processor speed Bus speed Amount of cache available Number of processor cores