Presentation is loading. Please wait.

Presentation is loading. Please wait.

29 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.

Similar presentations


Presentation on theme: "29 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems."— Presentation transcript:

1 29 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems Autumn 2013 Week 5b: CPU and the Machine Cycle

2 29 October 2013Birkbeck College, U. London2 Action of a Computer 1 Recall Tom and his boxes Instruction: add the contents of box a and box b, put the result in box c. The part of a computer corresponding to Tom is the central processing unit (CPU) 10 acbde f g

3 29 October 2013Birkbeck College, U. London3 Action of a Computer 2 Tom has to: Read the contents 10 of box a and the contents 5 of box b. Add together 10 and 5 to get 15. Write 15 in box c. 10 acbde f g

4 29 October 2013Birkbeck College, U. London4 Summary of the Actions of the CPU Obtain an instruction Read data from memory Calculate Write data to memory The CPU requires its own memory for storing instructions and data

5 29 October 2013Brookshear, Section 2.15 Parts of a Computer arithmetic/logic unit register unit central processing unit : registers bus main memory control unit

6 29 October 2013Brookshear, Section 2.16 Central Processing Unit Register: small amount of very fast read/write memory, e.g. enough to store one number. Arithmetic/Logic Unit: operates on data in registers, e.g. addition, subtraction. Control Unit: controls the ALU. ALU Control Unit Register Unit......

7 29 October 2013Brookshear, Section 2.17 Concepts Places for storing bit strings: registers, main memory. Transfer of bit strings from one place to another. Operations on bit strings: produce a new bit string from one or more given bit strings.

8 29 October 2013Brookshear, Section 2.18 Some Actions of a Computer ALU CPU registers bus main memory 1. Take a bit string from main memory and put it in a register. 2. Take a bit string from a register and put it in main memory. 3. Move a bit string from one register to another. 4. Take bit strings bi from registers Ri, i=1, 2. Interpret b1, b2 as twos complement representations of integers, add them and put the result in the register R3. control unit

9 29 October 2013Brookshear, Section 2.19 Bus Wires connecting CPU to main memory. Read: CPU sends read signal and address of memory cell. Write: CPU sends write signal, address, and data to be written. Length ~15cm. Speed of light = 30cm in 1 ns. Time for CPU to access a register ~ 2.5 ns.

10 29 October 2013Brookshear, Section Logical Structure of Main Memory List of cells or words addressed from 0 to 2 n -1, where n is a large integer. All cells contain the same number of bytes, e.g. 1 byte. Example: if a register contains 16 bits then the largest memory that can be addressed using the register has 2 16 cells.

11 29 October 2013Birkbeck College, U. London11 Memory Access Times Access Time Size CPU registers 2.5ns256 bit RAM60 ns~1 GB Hard disk15 ms2 TB Tape10min10 TB

12 29 October 2013Brookshear, Section Stored Program Concept The program is stored in main memory along with the data. The control unit reads both instructions and data from the main memory. This is the von Neumann architecture. Advantage: the program can be changed easily. Disadvantage: high traffic on the bus. This is the von Neumann bottleneck.

13 29 October 2013Brookshear, Section The Machine Cycle Fetch next instruction from memory to CPU Decode the bit pattern Execute the instruction Fetch Decode Execute

14 29 October 2013Brookshear, Section CPU and Main Memory in More Detail Address | Cells FF Arithmetic/ logic unit control unit Registers F 1 Program counter Instruction register Bus Main memory Central processing unit

15 29 October 2013Brookshear, Section Special Registers Program counter: contains the address of the next instruction to be executed. Instruction register: holds the instruction which is being executed.

16 29 October 2013Brookshear, Section Adding Values Stored in Memory 1.Get the first value from memory and place it in a register. 2.Get the second value from memory and place it in another register. 3.Activate the addition circuitry with the registers in 1 and 2 providing the inputs and another register to hold the result. 4.Store the result in memory. 5.Stop.

17 29 October 2013Brookshear, Section Cache Memory High speed memory in the CPU. Size ~100 KB. Stores data and instructions recently accessed from main memory. Cache read/write is faster than main memory read/write. Disadvantage: overhead of keeping the cache consistent with main memory.

18 29 October 2013Brookshear, Section System Clock Circuit generating pulses at regular intervals. The computers activities are in step with the pulses, e.g. 5 pulses for an addition. Current clock speeds ~ 2 GHz. (=2 pulses per nanosecond). Clock speed only a rough guide to performance, e.g. instructions per second.

19 29 October 2013Brookshear, Section Motherboard Main circuit board of the PC. Contains the central processing unit (CPU) and the bus. Components, e.g. memory, hard drive interface, plug into the motherboard to obtain power and communicate with the CPU.

20 29 October 2013Birkbeck College, U. London20 Example of a Motherboard


Download ppt "29 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems."

Similar presentations


Ads by Google