1.1 Processors Flashcards
CPU; FDE cycle; Factors affecting CPU performance; Pipeling; Von Neumann and Harvard architectures; CISC and RISC; GPUs; Multicore and parallel systems; I/O devices; RAM and ROM; Storage devices; Virtual storage
What does CPU stand for?
Central Processing Unit
What is the CPU?
Internal piece of hardware responsible for executing/processing instructions of programs
What does CU stand for?
Control Unit
What does the CU do?
Coordinates/synchronises activities of the CPU
Organises sequence in which program instructions are executed
Directs flow of data between CPU and other devices
Deals with inputs and outputs to the CPU
What does ALU stand for?
Arithmetic Logic Unit
What does the ALU do?
Arithmetic: complete arithmetic operations (+, -, *, /)
Logical: completes logical operations (==, >, <, !=)
What are registers?
Small memory locations inside the processor
What do registers do?
Store values/data temporarily to allow CPU fast access
What do general-purpose registers do?
Used to keep the results of intermediate calculations produced as part of a larger computation
What are dedicated registers?
Processor-based registers used for specific purpose
What are some examples of dedicated registers?
MAR
PC
ACC
MDR
CIR
What does MAR stand for?
Memory Address Register
What does the MAR do?
Stores the address of the memory location from which data/instructions are going to be fetched/written
What does PC stand for?
Program Counter
What does the PC do?
Stores address of the next instruction to be executed
What does ACC stand for?
Accumulator
What does the ACC do?
Holds results of calculations made by ALU
What does MDR stand for?
Memory Data Register
What does the MDR do?
Stores data being read from or being written to the RAM
What does CIR stand for?
Current Instruction Register
What does the CIR do?
Stores the instruction currently being executed
Stores data while it’s being decoded
What is data split into?
Opcode
Operand
What are buses?
Series of wires connecting the processor to the main memory and input/output devices
What are buses used for?
Transferring data between CPU and main memory
How many devices can send signals on a bus at one time?
One
What are the three types of buses?
Address
Data
Control
What is the address bus used for?
Transfers address to read data from or write data to between MAR and main memory
Is the address bus bidirectional or one direction?
One direction between CPU to RAM
What does the control bus do?
Transfers a read/write signal from CU to main memory
Is the control bus bidirectional or one direction?
Bidirectional
What does the data bus do?
Transfer data between main memory and the CPU
Is the data bus bidirectional or one direction?
Bidirectional
What is main memory?
Where programs and data are stored while waiting to be processed
What happens in the fetch stage of the FDE cycle?
The PC holds the address of the next instruction to be used
This address is copied into the MAR
The contents of the PC are incremented
The data found in the address in the MAR is copied to the MDR
The contents of the MDR are copied to the CIR
What happens in the decode stage of the FDE cycle?
The contents of the CIR are divided into the binary code for the operation to be carried out and probably the address of the data that will be used by the program
The CU then interprets the operation code so that the processor knows what to do next
What happens in the execute stage of the FDE cycle?
The address part of the instruction is copied from the CIR to the MAR
The data is used
What factors affect the performance of the CPU?
Number of cores
Size of registers
Size of RAM
Clock speed
Width of data bus
Cache
Word length/size
How does the number of cores affect the performance of the CPU?
Processor can have many processors/cores on a single chip, meaning that more than one instruction can be executed at one time
Why might there be delays on a core?
It requires a task on another core to be completed before continuing
What is parallel procesing?
Organising a task and sending the appropriate data and instructions to the appropriate core
How does the size of the registers affect the performance of the CPU?
Size determines the amount of data with which the computer can work at one time
How does the size of RAM affect the performance of the CPU?
More RAM, more programs and data can be held in memory
RAM is faster than a storage disk
If there isn’t enough memory, PC must move data between RAM and hard disk frequently, which is slow
What is clock speed?
Number of cycles per second
What is clock speed measured in?
Hertz
How does clock speed affect the performance of the CPU?
Faster the clock speed, the more instructions can be executed per second
What is the width of the data bus?
Number of parallel wires running between CPU and main memory
What does the width of the data bus determine?
How many bits can be transmitted between CPU and other devices
How does the width of the data bus affect the performance of the CPU?
Wider the bus, the more bits can be transferred at once, the fewer number of fetches needed
What else about the data bus affects the performance of the CPU?
The speed of the data transfer
What is cache?
High speed memory holding most recent data and instructions loaded by the CPU
Where is cache located?
Directly on the CPU so there’s faster access to them compared to RAM
How does cache affect the performance of the CPU?
The more cache, the fewer numbers of fetches
What is L1 cache?
Part of the circuitry of each core
Smallest and fastest
What is L2 cache?
Shared by cores
Slower and larger than L1
What is L3 cache?
Sits on or near the processor on the motherboard
Slower and larger than L2
What is L4 cache?
Placed on or near the processor
What is word length/size?
Amount of data handled by processor at one time
How does the word length/size affect the performance of the CPU?
Bigger the word length, the fewer fetches from main memory
What is pipelining?
Data/processes arranged in a series where the OUTPUT OF ONE IS THE INPUT OF THE NEXT
What does pipelining allow in the FDE cycle?
One task to be fetched, one decoded and one executed at the same time
How does pipelining affect the CPU
Maximises the use and increases the throughput
Why is the FDE cycle suitable for pipelining?
Consists of number of distinct stages that are repeated for every instruction
Between each stage, there are registers that can keep intermediate results and a clock signal that synchronises the flow of data (important to avoid overwriting data)
While one instruction is being fetched, one decoded and one executed
What does pipelining avoid?
Keeping internal components idle
What are the benefits of pipelining?
Instructions are executed at a faster rate
Improves processor performance
What are the features of Von Neumann architecture?
Single CU
Single ALU
Makes use of dedicated registers
DATA AND PROGRAMS STORED IN THE SAME MEMORY
SINGLE BUS USED TO TRANSFER DATA AND INSTRUCTIONS
Has a method to connect I/O devices
What is the problem with Von Neumann architecture?
Von Neumann bottleneck
What is the Von Neumann bottleneck?
Can only fetch either data or instructions because there’s only one data bus
What are the features of Harvard architecture?
DATA AND PROGRAMS ARE STORED IN SEPARATE MEMORIES
DATA AND INSTRUCTIONS ARE TRANSFERRED ALONG SEPARATE BUSES
Where is Harvard architecture used?
Embedded systems
What are the advantages of Harvard architecture?
Data and instructions can be fetched simultaneously
Faster
What are the disadvantages of Harvard architecture?
Costs more to develop as a second bus and memory needed
More complex
What architecture do modern computers use?
Mixture of Von Neumann and Harvard
What is a CPU instruction set?
Group of commands for a CPU in machine language
What are the two CPU instruction sets?
CISC
RISC
What does CISC stand for?
Complex Instruction Set Computer
Can CISC support pipelining?
No
How many machine cycles are there per instruction for CISC?
Multiple
How large is a CISC processor compared to a RISC?
Physically larger in size
Is CISC more or less expensive than RISC?
More expensive as they require more silicon
Does a CISC processor have more or less complex hardware than a RISC?
More complex hardware
What tasks do better with a CISC processor?
More intensive tasks
What is the energy consumption of a CISC processor?
Greater energy consumption than RISC
Where is a CISC processor used?
Laptops and desktop computers, made by Intel or AMD
What does RISC stand for?
Reduced Instruction Set Computer
Can RISC support pipelining?
Yes
How many machine cycles are there per instruction in RISC?
Single
How large is a RISC processor in comparison to a CISC?
Smaller in size as less complex circuitry
How expensive is a RISC processor compared to a CISC?
Cheaper because require less silicon needed
Does a RISC processor need more or less complex circuitry compared to a CISC?
Simpler hardware
What are the energy requirements of a RISC processor?
Lower energy requirements
Can go into ‘sleep mode’ when not actively processing
Where is a RISC processor used?
Smartphones and tablets, based around ARM processor
How many CPUs would a computers originally have?
Single CPU
Why were co-processors introduced?
Because the demands on CPU became too great
What are co-processors?
Additional processor that’s designed to complete a specific task
Executes tasks concurrently with main CPU
What is the effect of having co-processors?
Increases the speed of the computer
What does GPU stand for?
Graphical Processing Unit
What were GPUs originally designed to do?
To handle graphics
What is a GPU?
A processor that has thousands of small, simpler, more efficient cores that’s good at performing simple instructions on a large data set
Is a GPU quicker than a CPU?
No
Can a GPU run processes in parallel?
Yes
What is a benefit of a GPU?
Has a highly parallel structure enabling it to perform many processes at one time
What are some uses of a GPU?
Machine learning applications
Parallel process calculations
Bitcoin mining
Brute force decryption
What does a multicore system mean?
Multiple cores in the computer, meaning more instructions can be executed simultaneously, speeding up computer
Each core on the CPU can perform FDE cycle independent of other cores
Will a dual core processor double the performance of a computer?
No
What do you need to have to be use a multicore systems?
Have software that takes advantage of multiple cores
Have an OS capable of using multiple cores
What is parallel processing?
Breaking a task down into subtasks
Processes each subtask simultaneously on a separate core
How does parallel processing affect the performance of a computer?
Speeds up the performance
How do you implement parallel processing?
Multiple cores
Switching between instructions
What is multithreading?
Executing a set of instructions concurrently
What are the advantages of multi-threaded code/parallel processing?
Performance - can do multiple tasks in parallel
Responsiveness - tasks don’t necessarily have to wait for other tasks to finish before starting
Clearer code - tasks that are unrelated can be written in separate functions and run in different threads rather than needing to multiplexed into a single code path
What are the disadvantages of multi-threaded code/parallel processing?
Complexity of code - writing and maintaining multi-threaded code is generally considered to be harder than single-threaded code
Bugs - rewriting to be multi-threaded may introduce bugs
Less clear code - tasks that need to split to balance the load on each core might become less elegant
What are input devices?
Peripherals used to provide data and control signal to a computer system
What are output devices?
Peripherals that reproduce or display data and information from a computer system
What are storage devices?
Wide range of devices that provide persistent (permanent) storage for data files and applications
What does RAM stand for?
Random Access Memory
Is RAM volatile or non-volatile?
Volatile
What is RAM used to store?
Programs and data in use by the processor, such as OS and applications software
How large is RAM?
Usually quite large in comparison to cache but not as large as secondary storage
How does RAM speed up the computer?
Allows fast access to data because it is solid state
What does ROM stand for?
Read Only Memory
Is ROM volatile or non-volatile?
Non-volatile
What is ROM used to store?
Store the boot program (bootstrap), a small program to load the OS
Some BIOS may be stored here, but because it includes settings that change, not the whole BIOS
How large is ROM?
Usually quite small
What are programs stored in ROM or flash memory known as?
Firmware
Where is ROM used?
Embedded systems (washing machines) to store a program that can’t be changed
How does magnetic storage work?
Disk heads mounted on mechanical arms read and write the data
Multiple disk platters allow for tracks that are accessible from one position of the read-write heads forming a cylinder
What are the advantages of magnetic storage?
High capacity
Inexpensive per MB
What are the disadvantages of magnetic storage?
Slow
Least durable
Least portable
How does optical storage work?
Data stored on pits and lands circulating outwards from the centre
A laser reads over the pits and lands and a high frequency signal is created
Where is optical storage used?
To distribute music (cheap and portable)
Many computers don’t come with a device that can read optical storage
What are the advantages of optical storage?
Cheap and portable
What are the disadvantages of optical storage?
Lowest storage capacity
How does solid state storage work?
Uses non-volatile flash memory to store information
What are the advantages of solid state storage?
No moving parts so very durable and portable
Uses less power
More compact
Quieter to use
What are the disadvantages of solid state storage?
Expensive
What is virtual storage?
The pooling together of storage mediums to act like a single storage medium
What are examples of virtual storage?
The Cloud
Network Attached Storage (NAS)
What are the advantages of virtual storage?
Can easily expand amount of data storage
Multiple storage devices can be utilised into an appeared single storage device
Some forms can be cheaper
Can build redundancy and use for back up
Security will often be delegated to provider
What are the disadvantages of virtual storage?
If devices go down, may not be able to access your data
If security is not sufficient, data may not be protected
For a cloud, good internet connection is required to access files without a drop in performance