Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 CPU (Central Processing Unit)

2 The CPU is the brain of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where most calculations take place. In terms of computing power, the CPU is the most important element of a computer system

3 Popular CPUs CyrixMotorola (Apple) Pentium IV Pentium MMX Pentium III Intel Advanced Micro Devices (AMD)

4 4 Components of the CPU (1 of 2) ALU ALU (arithmetic logic unit) Performs arithmetic and logic operations (data changed) Arithmetic: add, subtract, multiply, divide, etc. Logic: AND, OR, NOT, Shift, etc. Data held temporary CU CU (control unit): functions performs fetch/execute cycle Accesses and retrieves program instructions from the memory and issues commands to the ALU Moves data to and from CPU registers and other hardware components (no change in data) Registers Registers Example: Program counter (PC) or instruction pointer determines next instruction for execution

5 5 Components of the CU (2 of 2) Program counter (instruction pointer) Contains the address of the current or next instruction Normally instructions are executed sequentially Memory management unit Supervises fetching of instructions and data from memory I/O Interface Provides mechanism for input/output of data sometimes combined with memory management unit in a single Bus Interface Unit

6 6 Concept of Registers Single storage locations within the CPU used for a particular purpose Used to hold a binary value temporarily Manipulated directly by the Control Unit Each register is wired within the CPU directly (no address needed) for specific function Size in bits or bytes (not MB like memory) Can hold data, an address or an instruction

7 7 Registers: what they do Hold data being processed Hold instruction being executed Memory or I/O address being accessed Keep status of the computer Conditional branch instructions

8 8 General-Purpose Registers Part of ALU Accumulators Typically several dozen in modern CPUs (R0, R1,…) Hold data of arithmetic operations Hold intermediate results or data values, e.g., loop counters To transfer data between different memory locations and between I/0 and memory

9 9 Program Counter ( PC ) A dedicated register in the CPU Contains the address in memory of the current instruction being executed. Incremented automatically after each instruction. May be forced to change: e.g. “jump” instruction. Usually initialized to zero when machine starts, or is reset.

10 10 Instruction Register ( IR ) A dedicated register in the CPU which contains the actual current instruction. Op Code + Address What To DoLocation of Data Simple 16-bit example: 1101 101101100100

11 Pipelining Pipelining helps your processor work faster. Each time you perform an action on your computer, your processor must complete a sequence of instructions. Instead of completing one whole task and then starting the next, your computer lets the tasks overlap. This overlap, which is the basis of pipelining, shortens the time dramatically.

12 Pipelining A useful method of demonstrating this is the laundry analogy. Let's say that there are four loads of dirty laundry that need to be washed, dried, and folded. We could put the the first load in the washer for 30 minutes, dry it for 40 minutes, and then take 20 minutes to fold the clothes. Then pick up the second load and wash, dry, and fold, and repeat for the third and fourth loads. Supposing we started at 6 PM and worked as efficiently as possible, we would still be doing laundry until midnight.

13 Pipelining However, a smarter approach to the problem would be to put the second load of dirty laundry into the washer after the first was already clean and whirling happily in the dryer. Then, while the first load was being folded, the second load would dry, and a third load could be added to the pipeline of laundry. Using this method, the laundry would be finished by 9:30.

14 Pipelining Your processor does work in much the same way. Each action has five tasks: 1-fetch instructions from the memory. 2-read registers and decode the instructions. 3- execute the instruction or calculate an address. 4- access an operand in data memory. 5-write the result into a register. Each task takes a different amount of time, just like doing laundry - so the total length of time is dependent on the longest step. With pipelining, your processor can complete an action in much less time.

15 Pipelining A technique used in advanced microprocessors where the microprocessor begins executing a second instruction before the first has been completed. That is, several instructions are in the pipeline simultaneously, each at a different processing stage. microprocessorsexecutinginstruction

16 CPU History

17

18

19 Single Core Performance On technique used to increase single core performance was: Pipelining: beginning other waiting instructions before the first finishes

20 Single Core continued Another technique was multithreading Multithreading involves execution of two separate threads. Time is divided and interlaced between the two threads in order to simulate simultaneous execution

21 Problems with Single Core To execute the tasks faster you must increase the clock time. Increasing clock times too high drastically increases power consumption and heat dissipation to extremely high levels, making the processor inefficient.

22 Multi Core solution Creating two cores or more on the same Die increases processing power while keeping clock speeds at an efficient level. A processor with 2 cores running at efficient clock speeds can process instructions with similar speed to a single core processor running at twice the clock speed, yet the dual core processor would still consume less energy.

23 Multi-Core Advantages While working with many threads, a Multi Core processor with n cores can execute n threads simultaneously by assigning a core to each thread. If it must process more than n threads, say x, it can apply multithreading procedures with each core working with an average of x/n threads.

24 Other Incentives Improving an existing single core design or creating a better one is problematic in that it: Is time consuming to design Is risky to modify existing designs Creating multi core processors is convenient in that: The name “core dual” and similar names are good for marketing. It has lower manufacturing costs. Uses proven processor designs.

25 Implementations Two main ways to have multiple cores interact are the shared memory model, and the distributed memory model. In the shared memory model, all cores share the same cache memory. In the distributed memory model, each core has its own cache memory.

26 Implementations continued The Intel core duo design has a separate L1 cache memory for each core, but both cores share an L2 cache.

27 Implementations continued The AMD Athlon 64 X2 implementation has separate L1 and L2 cache memory for each core.

28 Problems Some of the current problems found with multi core processors include: Memory/Cache coherence. As mentioned earlier, some implementations have distributed L1 caches but must share an L2 cache. This poses the problem of making sure each core keeps the other updated with changes in the data in its own cache.

29 Problems continued Multi threading is also a problem when the software being run is not designed to take advantage of the multi core processor. This may mean that one core does most of the work which means that the processor is running no more efficiently than a single core.

30 Dual core


Download ppt "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."

Similar presentations


Ads by Google