55
Higher Computing Computer Structure

Higher Computing Computer Structure. What you need to know about computer systems: ALU and control unit Registers, cache and main memory Function

Embed Size (px)

Citation preview

Page 1: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Higher ComputingComputer Structure

Page 2: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

What you need to know about computer systems:

ALU and control unit Registers, cache and main memory Function and speed of access to memory Data and address buses Control lines System performance Current trends in computer hardware

Page 3: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The Processor The processor is the main part of the

computer It consists of the:

Control unit Arithmetic and logic unit Registers

Page 4: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The computer structure Control bus not shown

Electronicclock

Clock pulses

Address bus

data bus

MicroprocessorRAM ROM VDU and

keyboardDisk, CD/DVD

Printer, plotter, scanner

Digital I/O

A/DD/A

Process control

Page 5: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The processor structure

Mainmemory

Memoryaddressregister

Memorydata

register

Control unitA L U

Other registers

Electronicclock

Clock pulses

Address bus

data bus

Control bus (read and write)

Internal processor bus

Page 6: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Buses There are three sets of wires that connect the

processor to the memory and input/output devices. These are called buses, the three buses are: The data bus The address bus The control bus

Page 7: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The data bus The data bus carries data to and from the

processor, main memory and other devices attached to the data bus

The data bus carries data in both directions depending on whether we are reading or writing data

Data is told which way to go by the control bus

Page 8: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The address bus The processor uses the address bus to tell the

memory which address is to be used It carries the address information from the

processor to the main memory and any other devices attached

The address bus is unidirectional (one way)

Page 9: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

More on the address bus The number of wires in the address bus (the

width of the bus) determines the number of storage location which the processor can address

A typical microcomputer with 32 wires in the address bus can address up to 4,294,967,296 (from 0 to 232-1) memory locations

Page 10: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Addressability Data is stored in storage locations Each piece data which can be stored in its own

storage location in main memory is called a word A word is the number of bits that the processor can

process in a single operation (clock pulse) Each storage location has its own unique address The method used to identify each unique address is

called addressability

Page 11: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The control bus The control bus is made up of a number of

separate wires each with its own function Read Write Clock Interrupt Non-maskable interrupt reset

} The fetch-execute cycle

Page 12: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The fetch-execute cycle The fetch-execute cycle consists of two parts The fetch part is where the instruction is

copied into the control unit of the processor and decoded (read)

The execute part occurs next and is the instruction being carried out (write)

Page 13: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The fetch-execute cycleThe processor sets up the address bus with the required addressThe processor activates the read lineThe instruction is transferred from the memory to the processor by using the data bus (fetch or read)The instruction is decodedThe instruction is executed (write)

Page 14: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The fetch-execute cycle

Memoryaddressregister

Memorydata

register

Control unitA L U

Other registers

Electronicclock

Clock pulses

Address bus

Internal processor bus

The processor sets up the address bus with the required address

Main memory

Page 15: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The fetch-execute cycle

Memoryaddressregister

Memorydata

register

Control unitA L U

Other registers

Electronicclock

Clock pulses

Address bus

Control bus (read)

Internal processor bus

The processor activates the read line

Main memory

Page 16: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The fetch-execute cycle

Memoryaddressregister

Memorydata

register

Control unitA L U

Other registers

Electronicclock

Clock pulses

Address bus

data bus

Control bus (read)

Internal processor bus

The instruction is transferred from the memory to the processor by using the data bus (fetch). It is stored in the MDR

Main memory

Page 17: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The fetch-execute cycle

The instruction which is in the MDR is transferred via the internal processor bus to the control unit and decoded

Memoryaddressregister

Memorydata

register

Control unitA L U

Other registers

Electronicclock

Clock pulsesInternal processor bus

Page 18: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The fetch-execute cycle

The instruction is then executed

Memoryaddressregister

Memorydata

register

Control unitA L U

Other registers

Electronicclock

Clock pulsesInternal processor bus

Control bus (write)

Mainmemory

Page 19: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The Control Bus - Clock The clock line carries a series of pulses at a

constant rate The pulses are used to keep the processor and

its related components in step with one another

The clock rate is the frequency at which the clock generates pulses and it is measured in hertz (Megahertz or Gigahertz)

Page 20: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The Control Bus - Interrupts An interrupt is a signal to the processor from

an input or output peripheral device An interrupt cause a break in the execution of

the processor’s current program An example of an interrupt would be a

message from the printer stating it was out of paper

A non-maskable interrupt is an interrupt that cannot be ignored

Page 21: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

The Control Bus - Reset The reset line on the processor is used to

return the whole computer system to a state, as if it has just been switched on

Reset is usually used when the computer has “frozen”

Page 22: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer memory - Registers The registers are a group of storage locations

inside the processor Registers hold:

Data being processed Instructions being executed Addresses to be accessed

Accessed instantly

Page 23: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Registers

Control unitA L U

Address bus

data bus

Memoryaddressregister

Memorydata register

Other registers

Page 24: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer memory - Cache Cache a small amount of memory Used as a temporary store for often used

instructions Two types

Level 1 cache built on the chip, very fast data transfer

Level 2 cache situated close to the chip, not just as fast

Page 25: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer memory

Mainmemory

CacheMemory(SRAM)

Microprocessor

1. Cache fetches the next instruction from main memory in advance of the processor needing it

2. Processor checks to see if the next instruction is in cache

3. If the instruction is in the cache , it is fetched from the cache, a very fast process

4. If the instruction is not in the cache, it has to be fetched from main memory, a much slower process

Page 26: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer memory

Mainmemory

CacheMemory(SRAM)

Microprocessor

1. Cache fetches the next instruction from main memory in advance of the processor needing it

2. Processor checks to see if the next instruction is in cache

3. If the instruction is in the cache , it is fetched from the cache, a very fast process

4. If the instruction is not in the cache, it has to be fetched from main memory, a much slower process

Page 27: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer memory – Main memory Random Access Memory

Dynamic Random Access Memory (DRAM) Needs to have its contents constantly refreshed

(about a thousand times per second)

Static Random Access Memory Retains its contents as long as there is power

Page 28: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer memory – Video RAM

Video RAM holds the data to be displayed on the screen

VRAM is sometimes contained on a separate graphics card

Page 29: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer memory – ROM Read Only Memory: holds data permanently Types:

Programmable ROM: empty on manufacture programmed by the user

Erasable Programmable ROM: can be programmed then erased then reprogrammed

Flash ROM: can be reprogrammed while its still inside the computer, used on devices such as digital cameras

Page 30: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Comparison of types of memory 1LOW

HIGH

Storage capacity

HIGH

LOW

Cost per byte of storage

HIGH

LOW

Speed of access

Registers

Cache

RAM

Hard disk

Four types of usable memory in order of closeness to the CPU

Page 31: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Comparison of types of memory 2

Element of computer memory

What do they hold

Speed of access (relative)

Nano-seconds

Registers

Cache- SRAM

Main memory

DRAM

ROM

Hard disk Virtual memory

Data, instructions and addresses

Immediate 1

Frequently accessed instructions

Very fast Level 1= 5

Level 2= 15

Programs and data when computer is on

Fast 50

Data even if computer is off

Fast 50 – 100

Programs and data permanently stored

Slow 1,000,000

Page 32: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

http://hackaday.com/2012/02/27/visualizing-a-nanosecond/

How long is a nanosecond?

Page 33: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Computer performance Computers are tested to see fast they process

data Generally speaking the faster the processor

(measured in Gigahertz) then the faster the processing

This is not always the case the computer can only process data as fast as its slowest part

What could slow the processing of data down?

Page 34: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Measures of performance The measures of computer performance

Clock speed Millions of Instructions per Second - MIPS Floating Point Operations Per Second - FLOPS Application based tests

Page 35: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

MOP – clock speed Everything the processor does is kept

precisely in time with the clock Simply put If the processors clock rate is 1 Gigahertz it

will be able to fetch 1000 million instructions per second

2 Gigahertz it will be able to fetch 2000 million instructions per second

Page 36: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

MOP - MIPS

Millions of Instructions Per Second

A measure of performance based on the average number of machine code instructions executed per second

Page 37: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

MOP - FLOPS

Floating Point Operations Per Second

A measure of the arithmetical calculating speed of a computer system

Page 38: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

MOP – Application based tests ABTs are more applicable for the everyday

user A benchmark is established and different

computers are compared How long each computer takes to complete a

particular task e.g. scale and rotate a graphic, do a 1000 calculations in a spreadsheet, reformat a 1000 page word-processed document

Page 39: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

MOP - evaluation Hardware such as printers can evaluated to

see how many pages per minute they can print

Benchmark tests are designed to reveal how the whole system performs and is not based merely on the processors clock speed

Page 40: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance A systems performance may be enhanced

by: Increasing:

Cache memory Data bus width The rate of data transfer The clock speed Video RAM

Adding more: main memory Processors

Page 41: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance (dbw)

Data bus width Increasing the DBW can increase the overall

performance of the system

Page 42: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance (cache)

The use of cache memory As it is much faster for the processor to

access data and instructions held cache if the size of the cache can be increased then the overall system performance will improve

Page 43: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance The rate of data transfer to and from

peripherals can have a major effect on system performance

The transfer rate is controlled by the type of interface connecting the peripheral to the processor

Page 44: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance (cs)

Increasing the clock speed of a processor can have a significant impact on the computers overall performance

Increasing the clock speed of the processor will in itself not increase the overall performance of the system if the data bus cannot deliver enough data to the processor so that it can work at its maximum performance

Page 45: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance (mm)

Adding more main memory Additional memory will allow more data to be

held in immediate access store rather than on backing storage.

It is much faster to access data from RAM than from hard disk

Page 46: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance (VRAM)

Video RAM is specialized RAM which is used on video cards.

Video RAM is dual-ported, which means it can be accessed by two different devices simultaneously. This enables data to be read from video RAM (i.e. sent to the computer monitor) at the same time data is written to video RAM.

Graphics performance may be improved by increasing the Video RAM

Page 47: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performance (proc)

Adding more processors to a computer system is an effective method of increasing performance

Some programs can take advantage of the presence of a second processor and this can have a significant effect on improving performance

Page 48: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

A factor not affecting performance Increasing the address bus width will increase

the total number of memory locations which the processor can address but:

This will have no effect on the performance

Page 49: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Factors affecting performanceTactic Effect on computer system

performanceIncrease clock speed

Increase data bus width

Increase cache memory

Increase width of address bus

Increase RAM

Increase VRAM

Increase rate of data transfer to and from peripherals

increase

increase

increase

increase

none

slight increase

increase graphics performance

Page 50: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Current trends in computer hardware Increasing clock speeds Although this increases performance technical

problems are being experienced such as heat dissipation and increased power consumption

Using more than one processor in a single computer can alleviate this or using two processors on a single chip –”dual core”

Page 51: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Current trends in computer hardware Increasing memory Both operating systems and applications are

continually demanding more RAM The cost of RAM has decreased Free RAM refers to the amount of RAM

available to applications after the operating system has been loaded

Page 52: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Current trends in computer hardware Increasing backing storage capacity The cost of backing storage has decreased The demand for backing storage of greater

capacity has increased The size of a typical hard disk on a home

computer has increased The variety of backing storage available has

increased

Page 53: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Types of interface - USB Universal Serial Bus Plug and play capabilities, hot swapping (no

need to reboot the computer) Provides power to low consumption

peripherals In many cases no device drivers needed Lower cost than firewire Over 1 billion devices in use

Page 54: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Types of interface – Firewire (IEEE 1394 interface )

A serial bus interface For high speed communications Real time data transfer Frequently used in a personal computer with

digital audio and digital video peripheral devices

Developed by Apple (firewire) and Sony (i.Link)

More expensive than USB

Page 55: Higher Computing Computer Structure. What you need to know about computer systems:  ALU and control unit  Registers, cache and main memory  Function

Transfer rates of interfacesType of interface Maximum transfer rate

Megabits per second

USB 1

USB 2

USB 3 (2008)

Firewire 400

Firewire 800

Firewire 1600 (2008)

Firewire 6400 (the future)

1.5

480

4800 – 5000 (5Gbits)

400

800

1600

6400