Presentation is loading. Please wait.

Presentation is loading. Please wait.

1Module 5: CPU How the CPU executes instructions Each CPU has its own instruction set Instructions are fundamental operations such as addition, load/save,

Similar presentations


Presentation on theme: "1Module 5: CPU How the CPU executes instructions Each CPU has its own instruction set Instructions are fundamental operations such as addition, load/save,"— Presentation transcript:

1 1Module 5: CPU How the CPU executes instructions Each CPU has its own instruction set Instructions are fundamental operations such as addition, load/save, branch Instructions are fundamental operations such as addition, load/save, branch Each instruction is represented by 0-1 string of a word length, must be load from memory to register before execution. Each instruction is represented by 0-1 string of a word length, must be load from memory to register before execution. Four steps performed for each instruction execution Fetch, decode, execute, store Fetch, decode, execute, store Machine cycle Machine cycle: the amount of time needed to execute an instruction Machine cycle: the amount of time needed to execute an instruction Instruction time Execution time Personal computers execute in less than one millionth of a second Personal computers execute in less than one millionth of a second Supercomputers execute in less than one trillionth of a second Supercomputers execute in less than one trillionth of a second System clock synchronizes the execution of a program, one instruction after another.

2 2Module 5: CPU The machine cycle

3 3Module 5: CPU Time for executing an instruction Instruction time Control unit gets instruction from memory and puts it into a register Control unit gets instruction from memory and puts it into a register Control unit decodes instruction and determines the memory location of needed data Control unit decodes instruction and determines the memory location of needed data Execution time Control unit moves data from register to ALU, which does the computation on the data Control unit moves data from register to ALU, which does the computation on the data Control unit stores result of operation in memory or in a register Control unit stores result of operation in memory or in a register FetchDecodeexecutestore one instruction time Next instruction Clock cycle time

4 4Module 5: CPU Microprocessor A CPU etched on silicon chip Contain tens of millions of tiny transistors Contain tens of millions of tiny transistors Transistors: electronic switches that may or may not allow electric current to pass through Transistors: electronic switches that may or may not allow electric current to pass through New technology makes the size of a transistor smaller and smaller! New technology makes the size of a transistor smaller and smaller! Current: 0.13 micro meter or 130 nano meter Moving to 0.09 micro meter 90 nano meter Next a few years: 60 nano meters a b c b = 1, a and c are connected, ON b = 0, a and c are disconnected, OFF

5 5Module 5: CPU Types of chips Intel makes a family of processors Pentium III and Pentium4 processors in most PCs Pentium III and Pentium4 processors in most PCs Celeron processor sold for low-cost PCs Celeron processor sold for low-cost PCs Xeon and Itanium for high-end workstations and network servers Xeon and Itanium for high-end workstations and network servers Other processors Cyrix and AMD make Intel-compatible microprocessors Cyrix and AMD make Intel-compatible microprocessors PowerPC chips used primarily in Macintosh computers PowerPC chips used primarily in Macintosh computers Compaq’s Alpha microprocessor used in high-end servers Compaq’s Alpha microprocessor used in high-end servers

6 6Module 5: CPU Microprocessor speeds Measure of system clock speed How many electronic pulses the clock produces per second (clock frequency) How many electronic pulses the clock produces per second (clock frequency) Usually expressed in frequency Usually expressed in frequency Gigahertz (GHz), Megahertz (MHz), Kilohertz (KHz) Gigahertz (GHz), Megahertz (MHz), Kilohertz (KHz) Or how much time for each cycle: clock cycle time clock cycle time = 1 / clock frequency Or how much time for each cycle: clock cycle time clock cycle time = 1 / clock frequency Second, millisecond, microsecond, nanosecond, picoseconds Second, millisecond, microsecond, nanosecond, picoseconds Comparison of clock speed only meaningful between identical microprocessors

7 7Module 5: CPU Other performance measures Millions of Instructions per Second (MIPS) High-speed personal computers can perform over 500 MIPS High-speed personal computers can perform over 500 MIPS Typically a more accurate measure of performance than clock speed Typically a more accurate measure of performance than clock speed Megaflop: one million floating-point operations Measures ability of computer to perform complex mathematical operations Measures ability of computer to perform complex mathematical operations

8 8Module 5: CPU Cache A temporary storage area Speeds up data transfer within computer Speeds up data transfer within computer Control Unit ALU Registers Memory CPU Cache L1 Cache L2 Secondary storage


Download ppt "1Module 5: CPU How the CPU executes instructions Each CPU has its own instruction set Instructions are fundamental operations such as addition, load/save,"

Similar presentations


Ads by Google