What’s going on here? Can you think of a generic way to describe both of these?

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

Computer Architecture and the Fetch-Execute Cycle
GCSE Computing - The CPU
CPU Describe the purpose of the CPU
A-Level Computing#BristolMet Session Objectives#4 MUST describe the differences between the main types of primary memory SHOULD describe the function and.
The Computer Processor
Processor Structure & Operations of an Accumulator Machine
Computer Systems 1 Fundamentals of Computing The CPU & Von Neumann.
Writer:-Rashedul Hasan Editor:- Jasim Uddin
Lecture#14. Last Lecture Summary Memory Address, size What memory stores OS, Application programs, Data, Instructions Types of Memory Non Volatile and.
Computer Processing of Data
Computing hardware CPU.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: CPU.
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
The fetch-execute cycle. 2 VCN – ICT Department 2013 A2 Computing RegisterMeaningPurpose PCProgram Counter keeps track of where to find the next instruction.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Stored Programs In today’s lesson, we will look at: what we mean by a stored program computer how computers store and run programs what we mean by the.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Chapter 5A Transforming Data Into Information.
HOW COMPUTERS WORK THE CPU & MEMORY. THE PARTS OF A COMPUTER.
The Central Processing Unit (CPU)
Session 4 Teaching Computing to GCSE Level with Python.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Activity 1 Review the work from last lesson so that you can explain the following: -What is the purpose of a CPU. -What steps does the CPU take to process.
Computer Architecture and the Fetch-Execute Cycle Buses, CPU Clock & Ports.
M211 – Central Processing Unit
Software Design and Development Computer Architecture Computing Science.
Stored Program Concept Learning Objectives Learn the meaning of the stored program concept The processor and its components The fetch-decode-execute and.
CPU Central Processing Unit
Computer Systems Nat 4/5 Computing Science Computer Structure:
Computer Hardware What is a CPU.
CPU Lesson 2.
OCR GCSE Computer Science Teaching and Learning Resources
GCSE Computing - The CPU
Computing Science Computer Structure: Lesson 1: Processor Structure
Systems Architecture Keywords Fetch Execute Cycle
GCSE OCR Computing A451 The CPU Computing hardware 1.
The CPU, RISC and CISC Component 1.
Chapter 10: Computer systems (1)
Chapter 2.1 CPU.
Stored program concept
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
3.3.3 Computer architectures
Lesson Objectives A note about notes: Aims
Assembly Language for Intel-Based Computers, 5th Edition
THE CPU i Bytes 1.1.
William Stallings Computer Organization and Architecture
Microprocessor and Assembly Language
Components of Computer
Microcomputer Architecture
CENTRAL PROCESSING UNIT CPU (microprocessor)
Instructions at the Lowest Level
Teaching Computing to GCSE
System Architecture 1 Chapter 2.
CPU Central Processing Unit
CPU Central Processing Unit
CPU Key Revision Points.
1-2 – Central Processing Unit
Unit 1.1 System Architecture Lesson 2
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Objectives Describe how common characteristics of CPUs affect their performance: clock speed, cache size, number of cores Explain the purpose and give.
GCSE Computing - The CPU
WJEC GCSE Computer Science
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Course Code 114 Introduction to Computer Science
OCR GCSE (9-1) Computer Science (J276)
Computer Architecture
Lesson Objectives A note about notes: Aims
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Presentation transcript:

What’s going on here? Can you think of a generic way to describe both of these?

Lesson Objectives Aims To understand what a computer is To understand the role and purpose of a CPU To be able to describe the Fetch/Execute Cycle To be able to discuss factors affecting CPU performance A note about notes: We will not be holding your hands in lessons. You are more than capable of working out when you should be making a note of things as we go through a lesson. If something is truly essential to copy down you will see this symbol: Otherwise, use your common sense, make notes on things and ask questions to fill out the gaps in your understanding.

Before we start What IS a computer? What is its purpose?

What IS a computer? –A machine which performs calculations –A general purpose or “stored program” machine –A device capable of processing and manipulating data from inputs to provide useful output What is its purpose? –To provide automation –To be used as a problem solving tool –To carry out tasks accurately –To perform repetitive tasks

What is a computer? A “computer” need only consist of a few important components: This generic structure is known as the Von Neumann Architecture He was a total nutter and we’ll learn more about him later

In context… Ports for input and output devices: Keyboards Mice Speakers Microphones Network Cables Central Processing Unit Memory Unit (RAM) Memory Unit/Storage (HDD) Motherboard – Physical connectivity, buses etc

The purpose of a CPU It’s job is to: –Fetch instructions –Decode what they mean –Carry them out –Store the result somewhere These four things are “processing” Instructions and data Processor (Carries out those instructions) Useful results (processed data)

CPU instructions ALL software is simply a long list of instructions A CPU will have a set list of instructions it understands. By combining these we can make it produce useful output. Instructions are SIMPLE: –ADD –BRP –STA Get used to this! You will be making “assembly language” programs using these instructions and more very soon!

The endless cycle Data Bus (wires for data to travel down) CPU

Task – in pairs Place the following parts of the fetch execute cycle in order: Fetch The PC is incremented so that it points to the next instruction to be fetched. The Program Counter (PC) contains the address of the next instruction to be fetched. The entire instruction is copied from the MBR and placed in the Current Instruction Register (CIR). The instruction is copied from the memory location contained in the MAR and placed in the Memory Buffer Register (MBR). The address contained in the PC is copied to the Memory Address Register (MAR). Execute The processor checks for interrupts (signals from devices or other sources seeking the attention of the processor) and either branches to the relevant interrupt service routine or starts the cycle again. The instruction is decoded and executed. The address part of the instruction is placed in the MAR.

Answers Fetch 1.The Program Counter (PC) contains the address of the next instruction to be fetched. 2.The address contained in the PC is copied to the Memory Address Register (MAR). 3.The instruction is copied from the memory location contained in the MAR and placed in the Memory Buffer Register (MBR). 4.The entire instruction is copied from the MBR and placed in the Current Instruction Register (CIR). 5.The PC is incremented so that it points to the next instruction to be fetched. Execute 6.The address part of the instruction is placed in the MAR. 7.The instruction is decoded and executed. 8.The processor checks for interrupts (signals from devices or other sources seeking the attention of the processor) and either branches to the relevant interrupt service routine or starts the cycle again.

Questions 1.What is software? 2.What role does the CPU play in a computer system? 3.What are the three core components of any computer system? Give examples where appropriate 4.What is the purpose of RAM in a computer system?

Back to our factory machines… How could we improve these situations to get more done in the same amount of time?

Improvements Speed –Simple? The faster your work, the faster it gets done! Number of machines –Parallel working means simultaneous output –Many hands make light work! Problems? –Need more raw materials close to hand (working cache)

Improving CPU performance There are three main methods Increase the number of Cores Increase the clock speed Increase the Cache size

Task “Improving CPU Performance” For each feature answer the following 1.What is this feature and how does this increase performance? 2.What trade offs/disadvantages are there? 3.Are there any situations where this feature would not provide a significant increase in apparent speed to a user? Finally, use the following resource to find out what “pipelining” is and add this to your notes Increase the number of Cores Increase the clock speed Increase the Cache size

Compare notes… Clock Speed The speed of the fetch-execute cycle is determined by an electronic clock chip. Generally, a quartz crystal circuit is used to generate clock pulses at a constant rate. The clock speed is measure in Hertz (Hz) or cycles per second. –1hz = 1 cycle per second –1Mhz = 1 million cycles per second –1Ghz = 1 billion cycles per second Simply, the higher the clock speed, the more cycles per second, the more instructions that can be processed. However… The CPU is rarely used at full capacity. See Cache…

Cores Modern CPU’s are actually many CPU’s in one chip. Each core is a CPU in it’s own right More cores mean the CPU can: Split a problem between cores Run multiple programs at once However as you will learn, four cores does not always mean the computer will work four times faster! Scheduling instructions to run in parallel and writing software that can be split in to “threads” is extremely challenging.

Cache CPU’s are faster than all other components in a system RAM is much slower, usually half speed This means a CPU could waste potentially 50% of its processing power simply doing nothing whilst waiting for instructions Cache memory helps solve this problem by keeping a store of frequently used instructions/data on chip L1 Cache runs at the same speed as the CPU There can be L2 and L3 cache that runs slightly slower (a few clock cycles!) this is generally bigger, but the trade off is always speed Cache is only as useful as the prediction and pre-fetch algorithms the CPU uses. Often when programs “branch” or act in an unpredictable manner, the cache is useless and has to be flushed/refreshed.

Pipelining Linear v’s Pipelined: pipelining.htmhttp:// pipelining.htm

Review/Success Criteria You should now be confident that you know: What the main components of a computer are What the “Von Neumann Architecture” is (we will revisit this later) What a CPU is, does and what simple CPU instructions look like Four factors that affect CPU performance. For next lesson you must: Find out what a “register” is in a CPU What a “Data Bus” is and some examples of these