Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMPUTER Structure Higher Unit 1 – Computer Systems St Kentigern’s Academy.

Similar presentations


Presentation on theme: "COMPUTER Structure Higher Unit 1 – Computer Systems St Kentigern’s Academy."— Presentation transcript:

1

2 COMPUTER Structure Higher Unit 1 – Computer Systems St Kentigern’s Academy

3 What I need to know… Detailed description of the purpose of the ALU and control unit; Description of the purposes of registers: –to hold data being processed, –instructions being executed, and –addresses to be accessed; Description of the function of the data bus and the address bus; Description of the read, write and timing functions of the control lines; Identification of other control lines, including reset and interrupt lines; Simple description, referring to the appropriate buses and control lines, of the steps in the fetch-execute cycle;

4 What I need to know… Description of the following elements of computer memory: –registers, –cache, –main memory, –backing storage; Distinction between the above elements of memory according to function and speed of access; The concept of addressability;

5 What I need to know… Description and evaluation of the following measures of performance: –clock speed, –MIPS, –FLOPS, and –application based tests Description of the effect the following factors have on system performance: –data bus width, –use of cache memory, –rate of data transfer to and from peripherals Description of current trends in computer hardware, including increasing clock speeds, increasing memory and backing storage capacity

6 Two State Machine Two-state machine –a computer system is a two state machine as the processor and devices can either be on or off. This is represented using the digits 1 and 0 in the binary system. –A voltage is either being sent between processor and memory/device or it is not. Advantages of a two-state machine –simple architecture in designing a system which only uses two voltages (on and off) –good tolerance level –simplifies calculations

7 Input - Process - Output Input Device Output Device CPU Backing Storage

8 Central Processing Unit Main Memory Other Registers Memory Data Register Control Unit Address Bus Data BusControl lines Processor RAMROM Memory Address Register ALU

9 Central Processing Unit the Central Processing Unit is the brain of the computer. It consists of: –The processor Control Unit: controls the order in which instructions are executed and synchronises the other parts of the CPU ALU: performs all the calculations and logical operations Registers – temporary storage locations within the CPU –Main Memory RAM: stores data and program files when in use. ROM: stores the bootstrap loader

10 The Processor - Registers Registers are storage locations that are internal to the processor. They are used to: –Hold data that is being transferred to or from memory; –Hold the address of the location in memory which the processor is accessing to read or write data; –Hold the instructions that are being carried out.

11 The Processor – Control Unit At Intermediate 2 we learned that the main functions of the Control Unit are: 1.To control the timing of operations within the processor 2.To send out signals that fetch instructions from the main memory 3.To interpret these instructions 4.To carry out instructions that are fetched from main memory.

12 The Processor – Control Unit We will now go into this in more depth The Control Unit (CU) sends out control signals: –Within the processor to move data from one register to another and to activate specific ALU functions; –To the control bus to read or to write from memory; –To I/O modules

13 The Processor – ALU The ALU is part of the Processor where the following take place: –Calculations; –Boolean logic operations (AND, OR, NOT); & –Comparisons.

14 Internal Bus structure Main Memory MAR MDRCU PC SP IR ALU ACC Y X SR Address Bus Data BusControl lines

15 bus structure The Data Bus –The data bus allows data to be transferred between the processor and memory. –It is bi-directional as data must go both ways. –The width of the data bus is measured by the number of lines on the bus. Each line can carry one bit. A 32- bit data bus (word) can transfer 32 bits at one time. –The width of the data bus is important in determining system performance. Increasing the number of wires on the data bus will increase the quantity of data which the bus can carry.

16 bus structure The Address Bus –The address bus holds the address of the memory location being accessed. –The address bus is uni-directional. –The more wires on the address bus, the more storage locations the system can, in theory, address. –The maximum number of addresses = 2 to the power width of the address bus

17 Address bus question Q. A computer has a 24-bit data bus, 32-bit address bus and a 16 line control bus. Calculate the maximum amount of memory that can be addressed by this computer. Show all your working and express your answer in appropriate units. A. Will have 2 32 locations, Each of 24 bits (or 3 bytes) Hence, has 232 * 3 = 12 Gigabytes

18 bus structure The Control Bus (Lines) –The control bus is a series of lines that all perform different function in the controlling of the system: A read signal on the control lines instructs data to place data from the specified memory address on the data bus. A write signal on the control lines instructs memory to take data on the data bus and place it in the location specified by the address bus

19 bus structure The Control Bus (Lines) The Clock line is used to synchronise all the operations of the CPU. The pulses control when each step in the fetch-execute cycle takes place. These timing pulses coordinate and regulate the activities of the processor. A signal on the reset line returns the system to its initial state, stops all processes, clears the registers and RAM.

20 bus structure The Control Bus (Lines) A signal on the interrupt line causes the current routine being carried out to be suspended and gives control of the processor to another routine.

21 Question time 1.A processor has three main parts. Name them. 2.What is a bus in a computer? 3.A microcomputer has 3 buses. Name them. 4.Which bus is uni-directional? Why? 5.State one effect of increasing the width of: 1.The data bus; 2.The address bus. 6.What is a WORD? 7.What is the purpose of the “reset” button on a pc?

22 Computer memory The elements of computer memory are: –Regisers; –Main Memory; –Cache; & –Backing Storage.

23 Registers Registers are a group of temporary storage locations within the processor. They are used to hold: – data being processed; –Instructions being executed; & –Addresses to be accessed. Since registers are on the processor, their speed of access is immediate.

24 Main Memory Main memory is used to store data and instructions while the processor is running a program. The processor can access main memory by reading from and writing to memory storage locations, each of which is identified by a unique address. The ability of the processor to identify each storage location is called its addressability. Each storage location can hold a quantity of data called a word. A word is the number of bits that can be processed by the processor in a single operation.

25 Main Memory There are two types of main memory: –Random Access Memory (RAM), & –Read Only Memory (ROM).

26 Random Access Memory the processor can: –read data from RAM –write or change RAM data RAM is volatile i.e. data stored in RAM is lost when the computer is turned off the purpose of RAM is to hold data or programs while they are being used or processed. When a user loads a program or data the file is copied from backing storage to RAM direct access medium

27 Random Access Memory There are two main types of RAM: –Static RAM SRAM is a type of RAM that doesn’t need to be constantly refreshed. It retains its contents as long as the power is on. It has a very fast access speed. It is used for the processor’s cache. –Dynamic RAM DRAM’s contents have to be continually refreshed or any data contained in it will be lost. Slower access than SRAM.

28 Random Access Memory Other main type of RAM: –Video RAM VRAM id designed to hold the data which is to be displayed on the computer screen or monitor. The amount of VRAM in the computer is directly related to the number of colours and the available resolution. VRAM is sometimes contained in a separate graphics card (VGA card). E.g. GE Force 512mb graphics card has 512mb of RAM on board.

29 Read Only Memory is permanently written into the ROM microchip at manufacturing cannot be changed data is not lost when the computer is turned off must be replaced if upgraded direct access medium

30 Read Only Memory Main types of ROM –Programmable ROM PROM is empty when manufactured and may be permanently programmed by the user. –Erasable PROM EPROM can be programmed, erased and reprogrammed. –Flash ROM Flash ROM has the advantage that is may be reprogrammed while it is still inside the computer. Flash ROM is now a very popular backing storage medium. Flash ROM is used in USB Drives and Memory cards.

31 Uses of Read Only Memory Bootstrap Loader –most computers use ROM to store a small part of the operating system called the bootstrap loader –CPU uses this program at power-on to load the rest of the OS from the hard disc –as the program in ROM, it is available instantly and cannot be lost / damaged

32 Links between processor & Memory stored program concept –peripheral devices slow the processor down so to speed the system up data that the processor is going to use is taken from the hard disk and put in memory which works at the same speed as the processor. –data and programs are stored in RAM until required by the processor. unique memory location –to find information each memory location has a unique address

33 Fetch execute cycle This describes how the processor fetches instructions from memory then carries them out, it divides nearly into two parts: –Fetch this part of the cycle reads the next instruction from main memory into the processor; –Execute this part interprets and performs the instruction.

34 Fetch execute cycle Fetch –The memory address of the next instruction is placed on the address bus; –A read signal is activated on the Read Lines; –The data stored at the addressed memory location is placed on the data bus and transferred to a register which holds it until it is executed. Execute –The processor decodes the instruction; –The processor executes the instruction.

35 Writing to memory processor sets up address bus with address; processor sets up data bus with data to be written on; processor activates write line on Control Bus; & Data is transferred from processor to memory location

36 Reading from memory processor sets up address bus with address processor activates read line on Control Bus; & memory releases data from that memory location onto data bus.

37 Computer Memory - REgisters oRegisters oThese are temporary memory locations within the processor which are accessed by the processor during the execution of instructions. oThey are used to hold data, instructions and addresses.

38 Computer memory - Cache oThis is a small fast memory unit which the processor checks for data and instructions before accessing MM. oLogically cache memory lies between MM and the processor. (though some processors have cache built into them) oWhen the processor attempts a read from memory, it checks cache first. If the data is already stored there it is transferred directly to the processor. This saves a read operation which is much slower than accessing cache.

39 Computer memory - Main Memory oThis is the main internal storage area for the computer where instructions and data are stored. oIt is divided into RAM and ROM sections. oReading from MM is slower than accessing either registers or cache memory

40 Computer Memory - Backing Store oBacking Storage oThis is the slowest form of memory and is used to store user data and software. oIt retains the data when the power is switched off, unlike RAM.

41 Comparison of memory TypeFunctionSpeed of Access RegisterInternal to the processorImmediate; internal Holds data while beingto the processor processed. CacheStands between the Slower access than a processor and MM. register but faster than Processor checks the cache accessing MM. memory for data first Main MemoryStores user data and s/w in Next in terms of speed RAM and sys s/w in ROM.Accessing data in MM is slower than cache or registers. Backing StorageStores data, s/w. RetainsSlowest of all memory. the data when power off.

42 Addressability Computer memory is organised into units of equal size called memory or storage locations. Instructions or data eg numbers, characters, and bitmaps are kept inside these storage locations as binary patterns Each memory storage location has its own unique address, just like houses in a street. The CPU uses the address to identify a memory location and access the data stored there.

43 Addressability a word is the amount of data that a processor can address, transfer or manipulate in a single operation computers typically work with 32 bit or 64 bit words. e.g.a 32-bit word size computer would store 32 bits in each memory location a larger word size makes a CPU more powerful the number of memory locations that a processor can address is, in theory, limited by the number of lines on the address bus. Storage location 1100110100011010 16 bit word size

44 Concept of addressability AddressMemory Location Contents 1000000000000010101 0101 1111 0000 1111 0000 1111 0000 1000000000000101101 0101 1111 0000 1111 0000 1111 0011 1000000000000110111 0101 1111 0000 1111 0110 1111 0011 16 bit addresses = 16 line address bus Each location stores a 32-bit number

45 Measuring performance You need to be about to describe and evaluate the following measures of performance: –Clock Speed –MIPS –FLOPS –Application based tests

46 Clock speed The clock pulses regulate and coordinate the activities of the processor. These pulses are measured in megahertz and gigahertz. 1 MHz = 1 million pulses per second, 1 GHz = 1000 MHz

47 Clock speed How good a measure of performance is it? –The clock speed does give you an indication of the performance of the processor which is at the heart of system. –But the performance of a processor is not dictated by the speed of the clock alone. –Other factors such as the size of the data bus must be considered.

48 MIPS MIPS is short for millions of instructions per second. –This is based on the measurement of the number of machine code instructions that can be processed in a second. How good a measure of performance is it? –It does not take into account the size and complexity of the instructions being carried out and is a rough indication of performance.

49 FLOPS FLOPS is short for floating point operations per second. –This measures how many floating point operations a processor can carry out in a second. How good a measure of performance is it? –Seen as the most reliable indicator of system performance. This is because it is an objective approach measuring the number of clearly definable, arithmetical tasks that can be carried out per second.

50 Application-based tests Most magazines use application-based tests (bench mark tests) to compare system performance. They set out a series of practical tasks using a range of standard application packages and award scores for the performance in each task and then use these scores to make overall comparisons.

51 Application-based tests How good a measure of performance is it? –The other ways of measuring performance are reasonable indicators of how well a system will actually perform. –However, they do not provide us with evidence of how well a system will actually perform any given practical task. –Using application-based tests provides us with actual evidence of system performance in carrying out complex operations at high speed. –These are seen as a very reliable way of measuring performance.

52 System performance You need to be able to understand the effect on system performance of: –Memory –The width of the data bus; –The use of cache memory; & –The rate of data transfer to and from peripherals.

53 Memory Data in RAM does not have to be fetched from slower disc. Some memory chips enable faster memory reads. More RAM allows more/larger programs, more multi-tasking. Easier option for users.

54 Data bus width The width of the data bus (word size) indicates the number of bits that can be transferred in parallel to and from memory. A 32-bit data bus can transfer 32 bits in one operation. PS2 - 128-bit data bus - fast PS3 - 256-bit data bus - dead fast (2x)

55 Data bus width Processors with longer word size process larger instruction codes and larger data values in each CPU cycle, more powerful. Increasing the address bus enables more storage locations to be accessed.

56 Cache memory Cache memory is located between the processor and main memory. Usually made up of fast acting SRAM. Holds copies of data and instructions that are commonly used by the processor. Processor can get this data quicker than locating it in main memory.

57 Data transfer between processor and peripherals All peripherals operate at slower speeds than the processor. This slows down processing if reading from a disk/cd etc. Selecting a drive with a faster transfer rate can improve the overall performance of your system.

58 System Performance Summary TacticEffect of System Performance Increase Clock SpeedIncrease Increase data busIncrease Increase cache memoryIncrease Increase address busNone Increase number of processorsIncrease Increase RAMSlight Increase in performance Increase VRAMIncrease Graphics performance Increase data transfer rateIncrease


Download ppt "COMPUTER Structure Higher Unit 1 – Computer Systems St Kentigern’s Academy."

Similar presentations


Ads by Google