In: Computer Science
The speed at which a processor can process instructions can be increased by making its clock speed higher, or by increasing the amount of L1 cache memory on the processor chip.
Explain the terms clock speed and L1 cache and briefly discuss how increasing each of them increases the speed at which instructions can be processed.
The maximum word limit for Question 3(a) is 150 words.
b.You have the choice of buying two processors:
In order to decide which to buy, you decide to estimate the time each processor will take to process a program with 10,000 RISC instructions. Each RISC instruction takes one clock pulse to execute once it is in the registers, and has a size of 4 bytes.
How much time is needed to load all 10,000 instructions into the registers for each processor. Write your answers in seconds, using scientific notation.
You may assume that no data is needed for this test program. in each case you will only need to calculate the time to move 10,000 instructions into the registers and the time to execute the 10,000 instructions. You will then find the total time for each processor by adding these two values.
Write your answers in seconds, using scientific notation.
Cache memory
The cache is a small amount of memory which is a part of the CPU - closer to the CPU than RAM. It is used to temporarily hold instructions and data that the CPU is likely to reuse.
The CPU control unit automatically checks a cache for instructions before requesting data from RAM. This saves fetching the instructions and data repeatedly from RAM – a relatively slow process which might otherwise keep the CPU waiting. Transfers to and from cache take less time than transfers to and from RAM.
The more cache there is, the more data can be stored closer to the CPU.
A cache is graded as Level 1 (L1), Level 2 (L2) and Level 3 (L3):
Not a lot of physical space is allocated for cache. There is more space for RAM, which is usually larger and less expensive.
Clock speed
The clock speed - also known as clock rate - indicates how fast the CPU can run. This is measured in megahertz (MHz) or gigahertz (gHz) and corresponds with how many instruction cycles the CPU can deal with in a second. A 2 gHz CPU performs two billion cycles a second. A faster CPU uses more energy and creates more heat.
A computer will normally have a maximum clock speed set by default, but it is possible to change this speed in the computer BIOS. Some people increase a CPU clock speed to try to make their computer run faster - this is called overclocking.
There are limits to how fast a CPU can run and its circuitry cannot always keep up with an overclocked speed. If the clock tells the CPU to execute instructions too quickly, the processing will not be completed before the next instruction is carried out. If the CPU cannot keep up with the pace of the clock, the data is corrupted. CPUs can also overheat if they are forced to work faster than they were designed to work.