Presentation is loading. Please wait.

Presentation is loading. Please wait.

Structure of a computer system

Similar presentations


Presentation on theme: "Structure of a computer system"— Presentation transcript:

1 Structure of a computer system
Computer Structure A simple computer system consists of the following components: Processor Memory Input/Output Communication Channels Structure of a computer system INPUT PROCESSOR OUTPUT BACKING STORAGE MAIN MEMORY

2 Architecture of a computer system
Control Unit ALU Arithmetic Logic Unit Registers Main Memory External Memory Peripheral Devices buses This diagram is a typical example of John Von Neumann (1903 – 57) architecture. Virtually all computers follow this architecture model. Stored Program Concept.

3 Buses – communication channel.
The parts which go together to make up the computer system need to be able to communicate with one another. Buses connect the processor to the memory and input/output devices. There are three buses that connect all of these parts. Address Bus Processor Main Memory Input Output Data Bus The control bus is not shown in this diagram.

4 Standard Grade Revision Program
A program is a list of instruction which tell the processor to do something. Each program instruction is stored in separate locations with it own binary number in the computers main memory. An item is stored in memory in a storage location with its own unique address (binary number). RAM 011 111 101 100

5 Standard Grade Revision cont..
The processor can identify each storage location this is known as addressability. WORD Each storage location can hold data this is known as a word. Word is the number of bits that can be processed by the CPU in one operation

6 Address Bus The address bus is a collection of wires used to identify which address in memory the CPU is accessing. Unidirectional bus, transferring information in one direction. The number of wires in an address bus (width) determines the number of unique memory locations which the CPU can address.

7 Address bus width and addressable memory
2 lines 00 01 10 11 A 2 line address bus would allow addresses. 4 because 22 = 4. A 3 line address bus would allow addresses. 8 because 23 = 8. 3 lines 000 001 010 011 100 101 110 111 X lines on the address bus allows addresses. 2x A 24 line address bus allows 224 = storage locations

8 Calculating the addressable memory in a computer system.
Formula = Number of storage locations (addresses) x size of each storage location Type of question Calculate the maximum memory size of a computer with a 24 bit address bus and a memory word size of 16 bits.

9 = 2^24 x 16 bits = 2^24 x 16 bits = 16777216 x 2 bytes = 16777216 x 16
= Kb/1024 = 32 Mb = 2^24 x 16 bits = x 2 bytes = bytes = Kb = 32 Mb Question 1 Calculate the maximum memory size of a computer with a 32 bit address bus and a memory word size of 8 bits. Question 2 Calculate the maximum memory size of a computer with a 24 bit address bus and a 16 bit data bus. That the width of the data bus matches the capacity of each memory location.

10 Every time a bit is added to the width of the address bus, the address range doubles.
Increasing the width of the address bus, for instance, from 32 bits to 40 bits, will increase the total number of memory locations which the processor can address from 2^32 to 2^40. Increasing address bus width has NO effect on computer performance.

11 Data Bus Carries data to and from the CPU, main memory and any other devices attached to the data bus. Bi-directional bus – 2 way. The width of the data bus determines the quantity of data that the bus can carry at one time. CPU RAM WRITE READ It is a two-way bus as data may be going to the processor (Read) or coming from the processor (Write).

12 Most common 32 bit bus which can transfer 32 bits of data from a processing unit or storage device. (32 bit Word Length) Word Length – the number of bits a computer can process in a single operation. Increasing the data bus width will increase the quantity of data which the bus can carry at one time. This will have an effect on the computer performance of the computer system.

13 NMI - Non Maskable Interrupt
Control Bus (line) The control bus is not really a bus. Each wire is used for a separate purpose whereas the data and address bus consist of a collection of wires that are always together. The control bus is made up of a number of separate wires, each with their own function: Read/Write Clock Reset Interrupt NMI - Non Maskable Interrupt CU

14 More about this later – Fetch Execute Cycle
Read/Write Function Control unit will initiate a read signal when data has to be read from another part of the computer system. When data has to be written to a memory location then the control unit will initiate a write signal. More about this later – Fetch Execute Cycle

15 Clock Generates a constant pulse at a frequency measured in Hertz. Common CPUs available today perform at 3Ghz and faster. This means that a 3Ghz CPU can execute 3,000,000,000 instructions in a single second! Each beat causes the control unit to fetch and decode data, which is called the “Fetch Execute Cycle”.

16 Reset Used to return the processor to an initial state, as if it has just been switched on. All internal registers are cleared and the machine reboots. If you computer has ‘frozen’ many computers have a small button somewhere on the case which can be used to activate the reset line.

17 Interrupt A signal from a peripheral device or a program. Allows the peripheral or program to communicate with the processor. Each time the keyboard is pressed an interrupt is generated. IBM PC can allow 256 interrupts.

18 Steps involved with an interrupt
Stops the current program (break in execution) Saves current program Runs program to deal with interrupt (Interrupt Service Routine) Reloads its original task and continues what it was doing. Software can be used to ignore (mask) an interrupt. For example, a printer out of paper.

19 Non Maskable Interrupt
Behaves in the same way as an Interrupt, except that the processor cannot ignore the interrupt.

20 You have now seen the three buses.
The processor uses the three buses to communicate with the main memory. The processor works on data which is stored in main memory. It therefore spends a lot of time transferring data to and from the main memory. The two most basic operations which the processor carries out are and memory read memory write.

21 ALU Arithmetic Logic Unit
Inside the Processor Control Unit ALU Registers Control Unit ALU Arithmetic Logic Unit Registers PC MAR MDA IR MAIN MEMORY Control Bus (line) Data Bus Address Bus

22 Registers are temporary storage locations inside the processor.
The registers are used hold: ● data which is being processed ● instructions which are being executed ● addresses which are about to be accessed.

23 Registers Memory Address Registers memory address register used to hold memory address being accessed. Memory Data Registers contains the data to be written to memory or receives the data read from memory. Program Counter The register which stores the address of the next instruction is called the program counter. Usually after each instruction is executed, the program counter increases by one (hence the use of the word counter) so that it contains the address of the next instruction. Instruction Counter Hold the instruction currently being executed.

24 Control Unit The control unit controls the flow of information through the processor, and coordinates the activities of the other units within it. In a way, it is the "brain within the brain", as it controls what happens inside the processor, which in turn controls the rest of the PC. The control unit fetches each instruction (by sending out a signal) in sequence, decodes it and executes it. This is known as the Fetch Execute Cycle.

25 Control Unit cont… Timing/Control Logic Tells other parts of the system what to do and when to do it. Makes sure everything happens in the correct place at the correct time. Instruction Decoder Decodes the machine code during the cycle. These signals are sent out and received on the control bus

26 Arithmetic Logic Unit (ALU)
Deals with the arithmetic operations and logical operations. Arithmetic Addition Subtraction Division Logic Logical OR Logical AND Think of programming IF mark >50 then print “PASS”

27 Stored Program Concept
Programs are stored in slow-to-access storage medium (hard disc) and the processor works on them in fast-access storage medium (RAM). By changing the program, which is stored or held in the computers main memory, a computer can carry out a completely different process. e.g. using Word and Excel at the same time. Process A process is a program in execution.

28 CPU What happens when a program is opened:
A processor of a computer is able to carry out a process only when it is given a set of instructions Programs move into RAM when in use by the computer Programs are stored in the computers Hard Disk CPU Hard Disk The Processor decodes the instructions and executes them.

29 Fetch Execute Cycle A program may contain thousands of instructions but the processor can only execute one instruction at a time. The fetch execute cycle is the name given to the way in which the CPU takes in an instruction from memory (FETCH) and carries out that instruction (EXECUTE).

30 In computing, the two-phase cycle used by the computer's central processing unit to process the instructions in a program. Fetch Stage During the fetch phase, the next program instruction is transferred from the computer's immediate-access memory to the instruction register (memory location used to hold the instruction while it is being executed). Execute Stage During the execute phase, the instruction is decoded and obeyed. The process is repeated in a continuous loop.

31 Summary – fetch-execute cycle (Memory Read)
The processor sets up the address bus with the address of the next instruction to be fetched. The processor sends a read signal on the control bus. The instruction is then copied onto the data bus from the correct memory location to a register in the CPU. The CU (Control unit) decodes the instruction and begins to execute it. Once the execute phase has completed, the fetch phase will be carried out again.

32 Fetch-Execute Cycle (Memory Write)
The processor sets up the address bus with the address of where the instructions has to be placed The processor sends a write signal on the control bus. The instruction is then copied onto the data bus from the CPU and taken to the memory location. The instructions are then placed in the correct memory location in main memory. Once the execute phase has completed, the fetch phase will be carried out again.

33 Known as primary storage
INPUT PROCESSOR OUTPUT BACKING STORAGE MAIN MEMORY Memory Main memory of a computer is a general term for any type of computer memory other than backing storage. Known as primary storage Memory consists of a number of storage location, each identified by a unique address

34 Types of Memory Main memory consists of two types, Random Access Memory (RAM) and Read Only Memory (ROM) Random Access Memory Holds data as long as computer is switched on Data is lost when computer is switched off Known as volatile memory RAM can be written to and read from Type types of RAM DRAM – Dynamic SRAM – Static

35 DRAM – Dynamic The term dynamic is derived from the fact that it does need refreshed Contents constantly refreshed from the CPU (1000 times a second) or data will be lost Access time of 60 – 70 nanoseconds (1 nanosecond is one billionth (10-9) of a second) Cheap to produce Holds large amounts of data Requires less power than SRAM

36 SRAM - Static Type of memory that is faster and more reliable than the more common DRAM The term static is derived from the fact that it doesn't need to be refreshed like dynamic RAM. Holds its data as long as there is a power supply Consumes more power Faster access times Expensive to produce SRAM is more suited to cache memory

37 VRAM – Video This is an old type of memory that was designed for used with graphic adapters. It is special because it allows two devices to read the contents of the memory at the same time. This allows the monitor to access the memory for screen updates, while at the same time allowing the graphics processor to provide new data.

38 Cache Memory The cache memory is similar to the main memory but is smaller than main memory and performs faster. The cache memory performs faster by accessing information in fewer clock cycles. There are two types of cache memory present in the majority of systems Level 1 (L1) cache is in the processor Level 2 (L2) cache memory is optional and found on the motherboard of most processor-based systems.

39 How it works? An area of high speed memory set aside to store frequently accessed data. When data is accessed, a copy (and its address in memory) is stored in cache memory. The next time the CPU looks for information, it first checks the cache. If the data is there (called a hit), it can retrieve it from the much faster cache memory. If it is not, then it accesses system memory, puts a copy of the new data in the cache, and processes the information.

40 Cache Memory A small amount of random access memory that sits between the processor and RAM in order to speed up data transfer. Temporary store for often used instructions. Web Pages are saved in cache memory Much faster for CPU to access data held in cache memory than in main memory. CPU CACHE RAM Very fast access fast access

41 Read Only Memory Memory that holds its data permanently. When the computer is switched off, data is preserved. The contents of ROM are fixed when the computer is manufactured. Used to hold part of the operating system program, the bootstrap loader, which is used to start up the computer. Access time of 10 – 50 nanoseconds

42 Types of ROM ROM: Read-only memory. The “1”s and “0”s are permanent and created at the silicon foundry. Only used for circuits needed in the tens of thousands and after many prototypes. PROM: Programmable read-only memory. A hardware device connected to a PC can program the ROM, but it is write-once. EPROM: Erasable programmable read-only memory. A PROM that can be erased by exposure to ultraviolet light . EEPROM: Electrically erasable programmable read-only memory. A PROM that can be erased by high voltages. FLASH ROM: Erased and reprogrammed easily inside a computer. Flash ROM is now very popular. Used for USB memory pens, memory cards, mobile phones.

43 Memory Map

44 Review Questions


Download ppt "Structure of a computer system"

Similar presentations


Ads by Google