GCSE Function and characteristics of OCR the CPU

25
2 GCSE OCR Computer Science J276 Function and characteristics of the CPU Unit 1 System architecture, memory and storage

Transcript of GCSE Function and characteristics of OCR the CPU

Page 1: GCSE Function and characteristics of OCR the CPU

2

GCSE OCR Computer Science J276

Function and characteristics of the CPU

Unit 1 System architecture, memory and storage

Page 2: GCSE Function and characteristics of OCR the CPU

•  Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), cache

•  Describe how common characteristics of CPUs affect their performance: clock speed, cache size, number of cores

•  Explain the purpose and give examples of embedded systems

Objectives

Page 3: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

A brief recap •  What are the two major components of the CPU?

•  What is their purpose?

Page 4: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Arithmetic Logic Unit (ALU) Performs two sorts of operations on data:

•  Arithmetic operations •  addition, subtraction, multiplication, division

•  Logical operations •  comparing one data item to another: is it smaller than, greater

than or equal to?

Page 5: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

The Control Unit “The control unit co-ordinates and controls all the operations carried out by the computer.”

•  Controls and monitors hardware attached to the system

•  Controls input and output of data

•  Controls the flow of data within the CPU

Page 6: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

What affects CPU performance? •  The following are three of the most common factors

which can affect a CPU’s performance •  Clock speed

•  Processor cores

•  Type and size of memory

•  Which have you heard of?

•  Can you explain them?

Page 7: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Factors affecting CPU performance

Clock speed Cache size

Number of cores

Cycles per second measured in hertz

The number of duplicate processors linked together on a single chip

Superfast working memory

Page 8: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Clock speed •  Everything in a computer happens on the pulse of

the internal clock

•  Therefore, the faster the clock speed, the faster the instructions are processed

Page 9: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Processor Speed •  One cycle per second = 1 Hertz (Hz) = 1 instruction

carried out each second

•  1 Kilohertz (KHz) = 1000 cycles per second

•  1 Megahertz (MHz) = 1,000,000 cycles per second

•  1 Gigahertz (GHz) = 1,000,000,000 cycles per second (Approximately 1 billion!)

•  How fast is your computer’s processor?

Page 10: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Multi-core processors •  A dual-core processor has two processors in the

same integrated circuit, linked together

•  A dual-core processor has twice the power but does not always perform twice as fast, because the software may not be able to take full advantage of both processors

•  A quad-core processor has four linked processors

Page 11: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Effect on speed •  A quad-core processor working on many different

tasks simultaneously, under ideal conditions can be up to 4 times faster than a single-core processor

•  If the computer is running a single program, it is not necessarily any faster, since instructions have to be carried out in sequence

Page 12: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Cache memory •  Cache is a small amount of very

fast, expensive memory in the CPU

•  It can be accessed faster than regular main memory (RAM)

•  Why is this useful for frequently used data?

CPU

Cache

Main Memory

Page 13: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Effect on speed of cache •  RAM is relatively slow memory and it is further away

from the processor than cache

•  It takes longer to retrieve an instruction or data from RAM than from cache

•  Program instructions and data that are fetched are stored in cache in case they are needed again soon

•  If you have a “while” loop in a program, for example, having all the instructions in the loop in cache speeds up execution

Page 14: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Levels of cache memory •  There are different ‘levels’ of cache:

•  Level 1 cache is extremely fast but small (between 2-64KB), located on the CPU

•  Level 2 cache is fairly close to the processor, fairly fast and medium-sized (256KB-2MB)

Page 15: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Levels of cache memory

Page 16: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

The benefits of cache •  The data used most often by the CPU is held in Level

1 cache so is instantly available

•  In most systems, other data needed by the CPU is accessed from the Level 2 cache 95% of the time

•  This greatly reduces the time that the CPU has to wait for data from main memory

•  The size of the Level 2 cache, and whether it is actually on board (on the CPU) is a major factor in determining the performance of the CPU

Page 17: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Which is (theoretically) faster? 1.  A dual core processor running at 2.7GHz with 4Mb of

shared cache memory

2.  A quad core processor running at 1.5GHz with 8Mb of shared cache memory

3.  A single core processor running at 3.2GHz with 2Mb of cache memory

4.  A dual core processor running at 3.2GHz with 4Mb of shared cache memory

Calculate the maximum number of cycles per second in each case and rank them in order of performance

Page 18: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Worksheet 2 •  Complete Task 1: The Central Processing Unit

Page 19: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Embedded systems •  Do these devices have inputs, processes and

outputs? •  Could they be classed as computers?

•  Why? Why not?

Page 20: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Embedded computers •  An embedded computer is a single microprocessor

that includes RAM, ROM and a CPU •  An embedded computer is frequently used to control a device

using simple controls

Page 21: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Embedded systems •  Without embedded systems, a digital device would

not be able to perform specific functions •  For example, a dishwasher wouldn’t know how to heat the

water, or a satnav wouldn’t know how to communicate with a satellite

•  What embedded functions do cars use?

Page 22: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Worksheet •  Complete Task 2

Page 23: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Plenary 1.  What is the main purpose of the CPU?

2.  How does the CPU operate?

3.  Name three common factors which affect how fast a CPU can perform

4.  What is an embedded system?

5.  Name three examples of an embedded system

Page 24: GCSE Function and characteristics of OCR the CPU

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage

Plenary – Answers 1.  Fetch, Decode and Execute data

2.  Fetches instruction/data from RAM, decodes the instruction/data and makes sense of it, executes the instruction/data. This is then repeated

3.  Clock speed, number of cores, cache size

4.  A single chip that contains all of the elements that are essential for any computer

5.  SatNav, Microwave, Car, Dishwasher, Burglar alarm, Washing machine…

Page 25: GCSE Function and characteristics of OCR the CPU

Copyright

© 2016 PG Online Limited

The contents of this unit are protected by copyright.

This unit and all the worksheets, PowerPoint presentations, teaching guides and other associated files distributed with it are supplied to you by PG Online Limited under licence and may be used and copied by you only in accordance with the terms of the licence. Except as expressly permitted by the licence, no part of the materials distributed with this unit may be used, reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic or otherwise, without the prior written permission of PG Online Limited.

Licence agreement

This is a legal agreement between you, the end user, and PG Online Limited. This unit and all the worksheets, PowerPoint presentations, teaching guides and other associated files distributed with it is licensed, not sold, to you by PG Online Limited for use under the terms of the licence.

The materials distributed with this unit may be freely copied and used by members of a single institution on a single site only. You are not permitted to share in any way any of the materials or part of the materials with any third party, including users on another site or individuals who are members of a separate institution. You acknowledge that the materials must remain with you, the licencing institution, and no part of the materials may be transferred to another institution. You also agree not to procure, authorise, encourage, facilitate or enable any third party to reproduce these materials in whole or in part without the prior permission of PG Online Limited.

Function and characteristics of the CPU Unit 1 Systems architecture, memory and storage