SCSC 311 Information Systems: hardware and software.

Slides:



Advertisements
Similar presentations
INSTRUCTION SET ARCHITECTURES
Advertisements

Microprocessors. Von Neumann architecture Data and instructions in single read/write memory Contents of memory addressable by location, independent of.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
Processor Technology and Architecture
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
Data Manipulation Computer System consists of the following parts:
The CPU - Outline. Components of CPU Englander p
Computer System Overview
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
11/11/05ELEC CISC (Complex Instruction Set Computer) Veeraraghavan Ramamurthy ELEC 6200 Computer Architecture and Design Fall 2005.
GCSE Computing - The CPU
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
 Central Processing Unit(CPU) Central Processing Unit(CPU)  Components of the CPU Components of the CPU  Actions Performed by CPU Actions Performed.
3.1Introduction to CPU Central processing unit etched on silicon chip called microprocessor Contain tens of millions of tiny transistors Key components:
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
Computers Central Processor Unit. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
Chapter 4  Converts data into information  Control center  Set of electronic circuitry that executes stored program instructions  Two parts ◦ Control.
Processor Structure & Operations of an Accumulator Machine
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.
Internal hardware and external components of a computer Three-box Model  Processor The brain of the system Executes programs A big finite state machine.
3 1 3 C H A P T E R Hardware: Input, Processing, and Output Devices.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
Computing hardware CPU.
Technology in Focus: Under the Hood
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Invitation to Computer Science 5th Edition
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Chapter 2 The CPU and the Main Board  2.1 Components of the CPU 2.1 Components of the CPU 2.1 Components of the CPU  2.2Performance and Instruction Sets.
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer.
Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Twelfth Edition Copyright © 2016 Pearson Education, Inc.0.
Cis303a_chapt04.ppt Chapter 4 Processor Technology and Architecture Internal Components CPU Operation (internal components) Control Unit Move data and.
Chapter 8 CPU and Memory: Design, Implementation, and Enhancement The Architecture of Computer Hardware and Systems Software: An Information Technology.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
Chapter 4 MARIE: An Introduction to a Simple Computer.
CPS 4150 Computer Organization Fall 2006 Ching-Song Don Wei.
Stored Program A stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read-write,
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Lecture 1: Review of Computer Organization
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Overview von Neumann Architecture Computer component Computer function
Computer operation is of how the different parts of a computer system work together to perform a task.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
The Processor & its components. The CPU The brain. Performs all major calculations. Controls and manages the operations of other components of the computer.
M211 – Central Processing Unit
Systems Architecture, Fourth Edition 1 Processor Technology and Architecture Chapter 4.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
CPU (Central Processing Unit). The CPU is the brain of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where.
Control Unit Operation
Chapter 4 Processor Technology and Architecture
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
5 - How Computers Calculate - the ALU
The Central Processing Unit
Architecture & Organization 1
Components of Computer
CENTRAL PROCESSING UNIT CPU (microprocessor)
Central Processing Unit CPU
CISC AND RISC SYSTEM Based on instruction set, we broadly classify Computer/microprocessor/microcontroller into CISC and RISC. CISC SYSTEM: COMPLEX INSTRUCTION.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
3.1 Introduction to CPU Central processing unit etched on silicon chip called microprocessor Contain tens of millions of tiny transistors Key components:
Central Processing Unit
Presentation transcript:

SCSC 311 Information Systems: hardware and software

Objectives CPU execution cycle CPU instructions Instruction format CPU design: CISC vs. RISC CPU registers Enhancing CPU performance The limitations of semiconductor-based microprocessors

Review: CPU Components Control unit  Moves data and instructions between main memory and registers Arithmetic logic unit (ALU)  Performs computation and comparison operations Set of registers  Storage locations that hold inputs and outputs for the ALU

A complex chain of events occurs when CPU executes a program.

Actions Performed by CPU Fetch cycle (instruction cycle) Control Unit: 1. Fetches an instruction from primary storage 2. Increments instruction pointer to location of next instruction 3. Decode: Separates instruction into components (instruction code and data inputs) 4. Stores each component in a separate register Execution cycle ALU: 1. Retrieves instruction code from a register 2. Retrieves data inputs from registers 3. Passes data inputs through internal circuits to perform data transformation 4. Stores results in a register

Index CPU execution cycle CPU instructions Instruction format CPU design: CISC vs. RISC CPU registers Enhancing CPU performance The limitations of semiconductor-based microprocessors

Instructions and Instruction Sets Instruction  Is lowest-level command to the CPU  A bit string, logically divided into components (op code and operands) Op code: is the unique binary number represents a instruction Operands: the input values for the instruction (data or address) Instruction sets is a collection of instructions that a CPU can process  Vary among different CPUs Three types of instruction  data movement  data transformation  sequence control

Three types of instructions 1. Data Movement Instructions  Copy data among registers, primary storage, secondary storage, and I/O devices Load: data transfer from RAM to a register Store: data transfer from a register to RAM 2. Data Transformation Instructions (details later)  Boolean operations (NOT, AND, OR, XOR)  Addition (ADD)  Bit manipulation (SHIFT) Logical shift Arithmetic shift

Three types of instructions 3. Sequence control instructions alter the flow of instruction execution  Branch instruction Normally the control unit fetches the next sequential instruction from RAM at the end of each execution cycle; Q: how would the control unit accomplish this?  Ans: In Branch instruction, one operand contains the RAM address for the next instruction is loaded into PC register Unconditional branch always depart from the normal sequential execution sequence Conditional branch depart from the normal sequential execution sequence only if a specific condition is met  The control unit checks a register which contains the result from a Boolean operation  Halt instruction suspends the flow of instruction execution in the current program. Q: what happens when an executing program halt?

Six Data Transformation Instructions The rules of NOT, AND, OR, XOR, ADD (self-study) ADD SHIFT (next slide)

SHIFT Instruction Two types of SHIFT instruction  Logic SHIFT and Arithmetic SHIFT Logic SHIFT Q: What can a logic SHIFT instruction do?

Logical SHIFT Ans: A logic SHIFT instruction can extract a signal bit from a bit string. E.g. 1, extract the fourth bit and put this bit on the rightmost E.g. 2, extract and check the sign bit of a 2’s complement number

Arithmetic SHIFT Arithmetic SHIFT instructions perform multiplication or division. For unsigned binary numbers: e.g.1: multiple by 2, e.g.2: divided by four For 2’s complement numbers: need to preserve the sign bit first

Complex Processing Operations Complex processing operations can be implemented by combining the primitive instructions  Examples … Most CPUs provide a much larger instruction set  Directly support complex instructions, such as multiplication, division, … Q: Why include these complex instructions in CPU instruction set?

Complex Processing Operations Ans: Tradeoff of CPU design  Tradeoff between CPU complexity and programming simplicity directly support complex instruction complicates circuitry but reduces programming complexity  Tradeoff between CPU complexity and program execution speed multi-step instruction sequences execute faster if they are executed within hardware as a single instruction – avoiding overhead Note that: additional instructions are required when new data types are added  E.g., If double precision floating point data type are supported by CPU, a set of instructions are required for this data type

Index CPU execution cycle CPU instructions Instruction format CPU design: CISC vs. RISC CPU registers Enhancing CPU performance The limitations of semiconductor-based microprocessors

Instruction Format Instruction format is a template  specifies the number of operands  specifies the position and length of the op code and operand(s)  Since instructions vary in the number and type of operands, CPUs support multiple instruction formats (in the next slide) Instruction formats vary among CPUs:  op code size  meaning of specific op code  length and coding format of operand  Etc....

(1) A 20-bit instruction uses register inputs and output: 8-bit Op code, 3 4-bit operands store register numbers (2) A 32-bit load and store instruction: 8-bit Op code, 2 4- bit operands, bit operand

Fixed Length Instruction vs. Variable Length Instruction Fixed length Instructions Padding shorter instructions with trailing zeros Simplify the instruction fetching (why?) inefficient memory use Variable length Instructions Complicate the instruction fetching (why?) efficient memory use

Index CPU execution cycle CPU instructions Instruction format CPU design: CISC vs. RISC CPU registers Enhancing CPU performance The limitations of semiconductor-based microprocessors

Complex Instruction Set Computing (CISC) CISC  In early days, memory is expensive, slow  CPU designer provided complex instructions do more work per instruction  each complex instruction require less memory and execution time Features of CISC  Need less memory for program storage and execution  Complex instructions usually have variable instruction length  A large instruction set complicates CPU design  CISC CPUs are complicated  hard to manufacture

Reduced Instruction Set Computing (RISC) RISC is a relatively new philosophy of CPU design (1980s - )  Absence of some complex instructions from the instruction set RISC CPUs do not combine data transformation and data movement in one instruction  RISC uses fixed length instructions, short instruction length, large number of general-purpose registers Feature of RISC  Need more memory for program storage and execution  Inefficient at executing complex instructions  RISC CPU is simple, easy to manufacture

RISC vs. CISC  OSs are implemented based on CPU design RISC chip: e.g. Hewlett Packard's PA-RISC processor Apples’ power Macintosh and some version of Linux are implemented based on RISC processor CISC chip : e.g. Intel Pentium, Xeon, Itanium Win OS are implemented based on CISC processor  Pros and Cons of CISC and RISC e.g. c = a * b Q 1: Which CPU design is better ? Q 2: Why does Intel use CISC design?

Index CPU execution cycle CPU instructions Instruction format CPU design: CISC vs. RISC CPU registers Enhancing CPU performance The limitations of semiconductor-based microprocessors

CPU Registers Two primary roles of registers  general-purpose registers: hold data for currently executing program that is needed quickly or frequently  special-purpose registers: store information about currently executing program and status of CPU

General-Purpose Registers General-purpose registers hold intermediate results and frequently needed data items  like a scratch-pad for CPU  Used only by currently executing program  Implemented within the CPU, so that contents can be read or written quickly Increasing general-purpose registers usually decreases program execution time, to a point Q: Why is that?

Special-Purpose Registers CPU uses special-purpose registers to track processor and program status Some special purpose registers  Instruction register  Instruction pointer (a.k.a. program counter)  Program status word (PSW) each bit in PSW is called a flag At the end of each execution cycle, control unit tests PSW flags to determine whether an error has occurred. Examples of PSW bits …

Word Size A word is a unit of data that contains a fixed number of bits.  the amount of data that a CPU processes at a time  32-bit CPU, 64-bit CPU Word size  matches the size of general purpose registers  is a fundamental CPU design decision Implications for system bus design and implementation of RAM  the bus width should be at least as large as word size  RAM should be able to read / write a word at a time  Increasing word size usually increases CPU efficiency, up to a point Q: why is that? E.g.,: Doubling word size generally increases the number of CPU components by 2.5 to 3 times

Index CPU execution cycle CPU instructions Instruction format CPU design: CISC vs. RISC CPU Registers Enhancing CPU performance The limitations of semiconductor-based microprocessors

Clock Rate System clock  A digital circuit that generates timing pulses (ticks) and transmits the pulses to other components  All devices coordinate their activities with the system clock.  The clock rate: the frequency at which the system clock generates timing pulses, measured in MHz or GHz The CPU cycle time – inverse of clock rate, measured in nanosecond Q: A computer has clock rate 5 GHz, what is CPU cycle time?

Clock Rate The clock rate / cycle time is only a part of CPU performance measurement  The rate of actual / average instruction execution is measured in MIPS or MFLOPS Simple instructions need one cycle time Complex instructions usually need multiple cycle time CPU relies on slower devices (RAM or HD) for supply of data  The performance of a computer system is not only decided by the CPU, but also by other devices (RAM, system bus … )  Example …  Wait state: each clock cycle that the CPU spends waiting for a slower device Q: How to enhance the performance of a computer system ?

Enhancing Processor Performance Memory caching (in Ch 5) PipeliningMethod of organizing CPU circuitry to enable multiple instructions to execute simultaneously in different stages Branch prediction and speculative execution Ensure pipeline is kept full while executing conditional branch instructions MultiprocessingDuplicate CPUs or processor stages execute in parallel

Pipelining Basic observation: each step in fetch and execution cycle is performed by a separate portion or stage of the CPU circuitry. 1. Fetch 2. Increment IP 3. Decode 4. Access ALU imputs 5. Execute arithmetic / comparison 6. Store ALU output Pipelining  Organizing CPU circuitry to enable multiple instructions to be in different stages of execution at the same time.  Similar to an assembly line

Challenges in Pipelining It is difficult to fully realize the theoretical improvement of pipelining hard to design a CPU that finishes different stages in one clock cycle. Some instructions in a program are not executed sequentially.  Conditional branch – CPU does not know which branch to take until evaluate a condition  has to break the pipelining

Branch prediction and speculative execution Some solutions to the problem of conditional branch in pipelining  Early evaluation CPU gets several instructions ahead of the current one, exam whether there is conditional branch instruction, if so, try to evaluate the conditional branch instruction earlier. But not always possible  Branch prediction CPU guesses which branch to take based on past experience (maybe CPU executed this portion of code before) Cannot guarantee taking the correct path  Simultaneous execution CPU executes both paths until the condition branch is evaluated, then aborts the incorrect path Requires redundant CPU stages and registers

Multiprocessing Multiprocessing: CPU architecture duplicates CPUs or processor stages can execute in parallel. Some approaches of multiprocessing:  Duplicate circuitry for some or all processing stages within a single CPU (80’s) e.g. Sun UltraSparc CPU duplicates ALU, Registers  Embedding multiple CPUs in a computer system and sharing memory (90’s)  Multiple CPUs to be placed on the same chip and sharing memory Enable multiple CPUs communicate at higher speed (2000 -)

Index CPU execution cycle CPU instructions Instruction format CPU design: CISC vs. RISC CPU Registers Enhancing CPU performance The limitations of semiconductor-based microprocessors

The Physical CPU CPU is a complex system  Contains millions of switches, which perform basic processing functions  From early CPUs with hundreds of switches to modern CPUs with millions of switches The physical implementation of CPUs  Switches and Gates  Are basic building blocks of computer processing circuits

Switches and Gates Electronic switches  Control electrical current flow in a circuit  Implemented as transistors a solid state semiconductor device control the flow of electronic current Gates  An interconnection of switches  A circuit that can perform a processing function on an individual binary electrical signal, or bit The construction of switches and the properties of electricity determine the CPU’s speed and reliability.

(The symbols of gates are not required.)

Addition circuit: combines a half-adder and an array of full adders (The detailed layout is not required.)

Electrical Properties of switches and Gates Conductivity Ability of an element to enable electron flow (conductor) Resistance Loss of electrical power that occurs within a conductor (electrical energy  heat and/or light) Heat Two negative effects of heat: Physical damage to conductor Changes to inherent resistance of conductor Dissipate heat with a heat sink, fan Speed and circuit length Time required to perform a processing operation is a function of length of circuit and speed of light Miniaturization: reduce circuit length for faster processing

Processor Fabrication Performance and reliability of processors has increased with improvements in materials and fabrication techniques  Transistors and integrated circuits (ICs)  Microchips and microprocessors First microprocessor (1971) 2,300 transistor Current memory chip – 300 million transistors Small circuit size, low-resistance materials, and heat dissipation ensure fast and reliable operation Fabricated using expensive processes - etching process (details are not required)

Current Technology Capabilities and Limitations Moore’s Law: rate of increase in transistor density on microchips doubles every months with no increase in unit Cost

Current Technology Capabilities and Limitations Rock’s Law  Arthur Rock made a short addendum to Moore’s Law  Cost of fabrication facilities for the latest chip generation doubles every four years E.g., A fabrication facility using latest production processes costs at least $10 B. Q1: Does Rock’s Law mean CPUs are becoming more expensive? Q2: Would Moore’s Law always be true?

Future Trends Semiconductors are approaching fundamental physical size limits  Further miniaturization will be more difficult to achieve The nature of etching process The limits of semiconducting materials Some technologies may improve performance beyond semiconductor limitations (details are not required)  Optical processing  Hybrid optical-electrical processing  Quantum processing