System's Architecture - CPU

System's Architecture

  • Explain the role and operation of main memory and the following major components of a central processing unit (CPU) within the Von Neumann architecture.
  • Explain the effect of the following on the performance of the CPU:
    • clock speed
    • number of processor cores
    • cache size
  • Understand and explain the Fetch-Execute cycle.

CPU

  • Processor that runs the system.
  • Processes data
  • Performs functions: searching, sorting, calculating
  • Made up of four main components

CPU Components

Arithmetic Logic Unit

The ALU performs

  • logical operations (including and, or, not)

  • logical comparisons

  • bit-shifting operations (multiplication)

  • arithmetic operations (addition)

Control Unit

The CU

  • handles all processor control signals

  • directs all input and output flow

  • fetches code for instructions

  • directs other units by providing control and timing signals

Internal Buses

CPU bus is internal to the CPU and is used to transport data to and from the ALU

Internal Clock

A clock signal used to synchronise things inside the computer.

The beginning of each clock cycle is when the signal goes from low to high (0 to 1).

Measured in Hertz (Hz).

Factors Affecting Performance

  1. Number of cores

  2. Clock speed

  3. On-board cache

  4. Instruction sets

Factors Affecting Performance

Number of cores

A cpu can have one or more units, each unit is called a core. Each core contains an ALU, control unit and registers.

Just because a CPU has multiple cores it will not necessarily be quicker:

  • the individual cores may have to wait for information from another core
  • the software may not have been optimised to take advantage of multiple cores

Factors Affecting Performance

Clock speed

Usually measured in megahertz (MHz) or gigahertz (GHz).

Generally the faster the clock the more instructions the processor can complete per second.

Factors Affecting Performance

On-board cache

  • High speed RAM built into the processor.
  • Size and speed of the cache will affect performance.
  • The cache memory holds regularly used data and instructions.

Factors Affecting Performance

Instruction Sets

Built into the CPU

Some instruction sets are more efficient than others.

RISC, CISC

Questions

  1. What does CPU stand for?
  1. True or false? The CPU can access cache memory faster than it can access RAM.
  1. Which of these is found in the CPU?
    RAM          Control Unit          Hard disk
  1. What is held in cache memory?
  1. Describe the purpose of the CPU.
  1. Describe the function of the ALU.
  1. Explain the role of the control unit in the CPU.
  1. Why is the capacity of the cache memory in desktops and laptops generally quite low?

Questions

  1. What does CPU stand for?
  1. True or false? The CPU can access cache memory faster than it can access RAM.
  1. Which of these is found in the CPU?
    RAM          Control Unit          Hard disk
  1. What is held in cache memory?

Central processing unit

True

Control unit

Cache memory holds regularly used data and instructions.

Questions

  1. Describe the purpose of the CPU.
  1. Describe the function of the ALU.
  1. Explain the role of the control unit in the CPU.
  1. Why is the capacity of the cache memory in desktops and laptops generally quite low?

It processes all the data and instructions that make the system work.

To perform arithmetic calculations and logic operations such as AND, OR, NOT.

The control unit handles the fetching, decoding and execution of program instructions. It sends signals to control the flow of data.

High cost and physical space.

Von Neumann Architecture

  • John Von Neumann, in the 1940's he described a basic architecture arrangement of a computer.
  • Data and instructions are stored in the same memory.
  • Most computers follow this concept.

Fetch-Execute Cycle

Decode the instruction

Execute the instruction

Fetch an instruction from Main Memory

The CPU continuously reads instructions stored in main memory and executes them as required.

Fetch

  • The control unit reads the memory address of the next CPU instruction.
  • The instruction is then copied from memory to one of the registers*.
  • The memory address in the control unit is incremented to point to the address of the next instruction, so that it is ready for the next cycle.

Register

Holds data, instructions and memory addresses that are about to be used by the CPU.

Decode

  • The control unit decodes the instruction.

Execute

  • The control unit executes the instruction.
  • This could involve writing data to memory or performing operations using the ALU.

Questions

  1. What are the CPU buses?
  1. What are the registers used for in a CPU?
  1. True or false? In the Von Neumann architecture, different memory units are used for data and instructions.
  1. Give three examples of instructions that might be executed by the CPU.
  1. Explain how the CPU clock works and its role in the CPU.
  1. Using all the words from below, describe what happens during the fetch-decode-execute cycle.
    Control unit          ALU          Registers
    Incremented          Memory address

Questions

  1. What are the CPU buses?
  1. What are the registers used for in a CPU?
  1. True or false? In the Von Neumann architecture, different memory units are used for data and instructions.

Collections of wires that are used to transmit data between components of the CPU.

To hold data, instructions and memory addresses that are about to be used by the CPU.

False - data and instructions are stored in the same memory unit.

Questions

  1. Give three examples of instructions that might be executed by the CPU.
  1. Explain how the CPU clock works and its role in the CPU.

Load/write data; perform calculations/logic operations;
change address; halt program

The clock sends out a signal that continually cycles between 0 and 1. It is used to synchronise when instructions should be carried out.

Questions

  1. Using all the words from below, describe what happens during the fetch-decode-execute cycle.
    Control unit          ALU          Registers
    Incremented          Memory address

The control unit reads the memory address of the next CPU instruction. The instruction is then copied from memory to one of the registers. The memory address in the control unit is incremented to point to the address of the next instruction, so that its ready for the next cycle. The control unit decodes the instruction and then executes it. This could involve things like writing data to memory or performing operations with the ALU.

Made with Slides.com