higher computing computer structure. what you need to know about computer systems: alu and control...
TRANSCRIPT
Higher ComputingComputer Structure
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
The Processor The processor is the main part of the
computer It consists of the:
Control unit Arithmetic and logic unit Registers
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
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
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
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
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)
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
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
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
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)
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)
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
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
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
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
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
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)
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
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”
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
Registers
Control unitA L U
Address bus
data bus
Memoryaddressregister
Memorydata register
Other registers
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
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
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
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
Computer memory – Video RAM
Video RAM holds the data to be displayed on the screen
VRAM is sometimes contained on a separate graphics card
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
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
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
http://hackaday.com/2012/02/27/visualizing-a-nanosecond/
How long is a nanosecond?
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?
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
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
MOP - MIPS
Millions of Instructions Per Second
A measure of performance based on the average number of machine code instructions executed per second
MOP - FLOPS
Floating Point Operations Per Second
A measure of the arithmetical calculating speed of a computer system
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
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
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
Factors affecting performance (dbw)
Data bus width Increasing the DBW can increase the overall
performance of the system
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
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
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
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
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
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
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
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
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”
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
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
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
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
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