CPU Flashcards

1
Q

What registers are involved in Von Neumann architecture?

A

Memory Address Register
Memory Data Register
Program Counter
Accumulator
Current Instruction Register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the Program Counter do?

A

Stores the location of the next instruction to execute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the Memory Address Register do?

A

Stores the address of a location in memory that is currently being read from or written to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the Memory Data Register do?

A

Holds the data that has just been retrieved from memory or the data that is about to be written to memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the Accumulator do?

A

Stores to results of calculations from the Arithmetic Logic Unit (ALU)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the Current Instruction Register do?

A

Stores the current instruction being executed in the CPU

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What other components are part of the Von Neumann architecture?

A

Decode Unit,
Control Unit,
Arithmetic Logic Unit,
Busses,
Cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 3 Busses in Von Neumann architecture?

A

Address Bus,
Data Bus,
Control Bus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the Decode Unit do?

A

Decodes the current instruction to be executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the Control Unit do?

A

Controls the flow of data in the CPU by telling each component what to do and when to do it e.g. telling memory to read at this exact moment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the Arithmetic Logic Unit do?

A

Performs arithmetic operations and logical operations on data, allowing the CPU to perform many calculations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the Cache do?

A

Stores frequently used instructions and data close to the CPU for much faster access compared to RAM, because it is so much closer to the proccessing unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 3 factors that determin CPU performace?

A

Cache Size,
Clock Speed,
Number of Cores

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does Cache Size affect CPU performace?

A

Larger cache size increases CPU performance by allowing for more frequently used instructions and data to be held much closer to the CPU for much faster access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does Clock Speed affect CPU performance?

A

A higher clock speed increases the number of fetches the CPU can make per second increasing performance as more instructions can be completed faster as more a fetched

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does Number of Cores affect CPU performance?

A

A larger number of cores can increase performance by allowing the CPU to proccess multiple threads at the same time, but is not just a simple increase as the more cores there are the more time they have to spend communicating and coordinating with each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Describe the entire Fetch-Decode-Execute Cycle

A

Fetch - Program Counter gives its location data to the Memory Address Register. The Program Counter then increments by 1. The Memory Address Register sends the address it has along the address bus to memory to read the instruction at that location. The Control Unit tells the memory to read now and the data is put on the data bus to be moved into the Memory Data Register. From there the instruction is moved into the Current Instruction Register to be decoded and executed.

Decode - The instruction is decoded by the Decode Unit, to know exactly what to do next

Execute - The Control Unit uses the decoded instruction and executes the instruction e.g. reading a value from memory into the accumulator

18
Q

What is an instruction set?

A

A list of machine code instructions a specific CPU can recognise

19
Q

What are some other factors that affect CPU performance?

A

Width and speed of the Data bus
Size of registers

20
Q

How does width on the data bus affect CPU performance?

A

larger width increases performance as more data and instructions can be given to the CPU at once

21
Q

How does speed on the data bus affect CPU performance?

A

Data fetched from memory reaches the CPU much faster, with higher data bus speeds, causing the CPU to stall for less time waiting for data and instructions increasing CPU performance

22
Q

How does register size affect CPU performace?

A

Larger register sizes can allow the CPU to hold more data and interact with more memory as addresses stored can be larger, this allows the CPU to accept more data at once as well to be worked on, increasing performance

23
Q

What is Pipelining?

A

While one instruction is being executed another one can be being decoded and another being fetched, rather than waiting for one instruction to be fully executed then fetching, decoding and executing the next one, making the CPU much faster

24
Q

What is a problem caused by a branch for pipelining?

A

When a branch occurs the Pipeline may have to be flushed as the next instructions that are in the pipeline aren’t supposed to be executed, however they are still put into the pipeline as if its a conditional branch the branch may not occur and the CPU can keep going without having to flush the pipeline

25
Q

What are the different types of CPU architecture?

A

Von Neumann
Havard
Contemporary

26
Q

What is the difference between a Von Neumann and Havard CPU?

A

Havard CPUs store instructions and data in seperate peices of memory hardware, allowing for Havard CPUs to be fetching data and instructions at the same time, as well as being very hard to control as instructions cannot be overridden by a program.
Von Neumann stores instructions and data in the same memory hardware, and it only has one bus for data and instructions meaning it has to wait for a piece of data or an instruction to be fetched before being able to fetch something else

27
Q

What are some features of Contemporary architectures?

A

SIMD - Single Instruction Multiple Data
MIMD - Multiple Instruction Multiple Data

28
Q

What does SIMD do?

A

Performs one instruction on many pieces of data, this can be split across several cores (like a GPU) to perform this instruction much faster

29
Q

What does MIMD do?

A

Performs multiple instructions on multiple pieces of data, allowing for the instructions to be easily split across several cores to perform the instructions faster

30
Q

What is a RISC?

A

Reduced Instruction Set Computer
A computer with a small number of simple instructions

31
Q

What is a CISC?

A

Complex Instruction Set Computer
A computer with a large number of complex instruction that may take several clock cycles to do and that requires specific hardware to do these instructions

32
Q

What are some characteristics of RISC?

A

Uses less power than CISC due to less transistors for speific hardware
Easier to cool as there are less transistors turning on and off
Only one cycle per instruction
Smaller number of addressing modes
Every instruction has the same format
Large number of instructions are needed to perform tasks

33
Q

What are some characteristics of CISC?

A

Uses more power due to more specific hardware
Harder to cool as more transistors turn on and off due to specific hardwre
Multiple cycles can be taken for each instruction
Instruction formats can be different for each instruction
Smaller number of instructions need to be executed to perform tasks
Larger number of addressing modes

34
Q

What is a Co-Proccessor?

A

A piece of extra hardware that takes away difficult jobs from the CPU

35
Q

What are some examples of Co-Proccesors?

A

GPU (Graphics Processing Unit)
NIC (Network Interface Card),
Audio Card,
Memory Management,
Hardware Firewall,
Cryptographic Hardware

36
Q

What are the names we give to mutli-core CPUs?

A

Single Core
Dual Core
Quad Core
Hexacore (6 cores)
Octacore (8 cores)
16-Core
32-Core
64-Core

37
Q

What are the different levels of Cache in a CPU?

A

Level 1 - on each individual core
Level 2 - accessible by every core close to all the cores
Level 3 - furthest away accessible by every core as well

38
Q

What is a thread?

A

A seperate flow of control, each thread having its own program counter so that they can be running different code

39
Q

When can and can’t threads be used?

A

Count to 100 can’t be threaded as 20 must follow 19
Calculating 10! can be threaded as you can multiply in any order and the result is the same

40
Q

How would threading be used in a software that queries a remote database?

A

Thread 1 = User Interface
Thread 2 = Networking
Thread 3 = Business Logic

41
Q

What is parallel processing?

A

Running several threads at the same time by running them across several cores