1

mrahmedcomputing

KS3, GCSE, A-Level Computing Resources

Lesson 4. Performance


Lesson Objective

  • Identify the factors affecting the speed of the CPU: Clock speed, Number of cores, Cache
  • Understand the use of pipelining and parallel processing in a processor to improve efficiency.
  • Recommend appropriate hardware for different situations.

Lesson Notes

Factors Affecting Performance

Clock Speed: The faster the clock speed, the faster a computer can do the FE cycle.

Cache Size and Level: Small superfast memory.

Number of Cores: More processors = more instructions executed simultaneously.

Bus Width (Address and Data): How many bits can be transferred at once.

Word Length: the amount of data that the CPU can process simultaneously.


CPU Speed

There are 3 main factors that affect the speed of the CPU:

CPU Speed

The FE cycle is triggered by the clock pulses of the system clock.

The system clock is one factor that affects performance of the CPU, every time the clock ticks an instruction is executed.

Clock speed is measured in hertz. The higher the frequency, the more instructions can be performed in a second.

CPU Speed - System Clock

A series of regular ON/OFF signals are used to synchronise the operations of the processor components.

Actions are usually carried out on the rising edge of the clock.

Actions each take a fixed number of cycles to complete.

Limits on Clock Speed

The higher the clock speed the quicker the processor. However the higher the clock speed the more power is used and the more heat is produced. You must set a limit on the clock speed so it does not overheat!

Users can sometimes increase the clock speed. This is called Overclocking. This temporarily increases the clock speed, but significantly increases the amount of heat produced by the CPU. Overclocking risks long term damage to a CPU.

Number of Cores

Multiple cores means multiple tasks can be performed at once.

Each processor (cores) operates a lower speeds and produces less heat.

Very good for Multimedia applications.

A dual-core computer has two processors linked together in the same integrated circuit.

A quad-core computer has four linked processors.

Quad-core computers have the potential to be significantly faster than single-core computers because each core can theoretically process a different instruction simultaneously.

However, software may not always be able to utilize all four cores effectively, limiting the potential performance gains.

Number of Cores - Parallel Processing

Parallel processing, also known as concurrent processing, involves utilizing multiple processor cores to work simultaneously.

In systems designed for parallel processing, each core can handle different aspects of the same task concurrently.


parallel lines


However, due to the sequential nature of instruction processing, this may not always be feasible.

The software has to be written to take advantage of multiple cores.

For example, browsers such as Google Chrome and Mozilla Firefox can run several concurrent processes. Using tabbed browsing, different cores can work simultaneously processing requests, showing videos or running software in different windows.

Cache Memory

Cache is a small amount of high-speed random access memory (RAM) built into the processor. It is used to temporarily hold data and instructions that the processor will most likely use.

Data can be processed quicker if you have more cache. This is because the processor does not have to wait for the data and instructions to be fetched from the RAM.

The more cache there is, the more data can be stored closer to the CPU.

Cache is graded as Level 1 (L1), Level 2 (L2), Level 3 (L3):

  • L1 is usually part of the CPU chip itself and is both the smallest and the fastest to access. Its size is often restricted to between 8 KB and 64 KB.
  • L2 and L3 caches are bigger than L1. Extra caches built between the CPU and the RAM.

Buses

Buses are circuits on the motherboard that connect the CPU to other components.

The faster the bus, the faster data is communicated.

Buses are limited by their width in bits. They are usually 8, 16 or 32-bits wide. This tells us how many bits can be sent by the bus at any one time, eg a 32-bit bus can send 32 bits at once.

Words

Memory is divided up in equal units called words. Word length is usually 8, 16, 32 or 64 bits.

Each word has a separate memory address.

Exam Qustion: What would be the memory capacity in bytes of a machine with an 8-line address bus and a word length of 8 bits?

The memory capacity of this machine can be calculated using the following steps:

  1. Number of Addresses: The number of addresses is determined by the number of bits in the address bus. With 8 address lines (bits), each line can be 0 or 1, resulting in 2 possible states for each line. The total number of addresses is calculated by raising 2 to the power of the number of address lines (2number of address lines).

In this case: Number of Addresses = 28

  1. Word Size: The word length refers to the number of bits that can be processed or transferred at once. Here, the word size is 8 bits (1 byte).

Memory Capacity: Since each address points to a single word (byte) with a size of 8 bits, the memory capacity in bytes is simply the number of addresses multiplied by the word size.

Memory Capacity (bytes) = Number of Addresses * Word Size (bytes)

Memory Capacity (bytes) = (28) * 1 byte

Memory Capacity (bytes) = 256 bytes

Therefore, a machine with an 8-line address bus and a word length of 8 bits can address a memory capacity of 256 bytes.

Address Bus

The width of the address bus determines the maximum possible memory addresses of the system.

With an 8-bit address bus, the maximum number of memory addresses is 28 = 256

Data Bus

The data bus is bi-directional as data can be sent both ways along the bus.

The width of the data bus is defined by the number of wires or lines it contains.

If the data bus is the same width as a computer word, data can be transferred to and from memory in a single operation.


Random Access Memory - RAM

RAM is volatile, meaning that the information stored in it is erased when you restart or shut down your computer.

It temporarily holds the files you are currently working on.

When you switch between programs or pages, the data stored in RAM is instantly available.

If there is too little RAM, it may not be able to keep all applications loaded at once. This will slow the system.

More RAM means you can load more applications at once and possibly load more memory intensive applications.

Slower than cache, faster than secondary storage.

Cache

Cache is very fast RAM that is close to the CPU. Data that needs to be processed by the CPU is stored in the cache. The larger the cache size, the more data can be stored closer to the CPU.


Pipelining

Pipelining is a performance-enhancing technique that overlaps stages in the fetch-execute cycle or breaks down arithmetic instructions into smaller steps.

As one stage completes for an instruction, another instruction enters the pipeline, allowing multiple instructions to be processed simultaneously.

Pipelines can have 10 to 12 stages, with some stages taking longer than others.


3