4.7.3 The Processor and its Components Flashcards

(70 cards)

1
Q

What is the overall meaning of this topic?

A

It is the internal hardware component of the computer that is responsible for executing the instructions of programs.

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

What components are there?

A

ALU, CU, Clock, Registers.

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

Define the ALU.

A

Arithmetic Logic Unit. A part of the processor that performs arithmetic calculations and logical operations on data for the computer programs.

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

What is the ALU responsible for?

A

ALU is responsible for performing arithmetic calculations and logic operations.
e.g addition…, logical bitwise operations, comparisons of values, shifting…

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

Define the CU.

A

Control Unit. A part of the processor that controls and manages the execution of instructions. It sends control signals to coordinate execution and controls FDE cycles and buses.

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

What is the CU in charge of?

A

CU is in charge of organising the sequence in which program instructions are executed, followed by decoding the instructions.
CU is also responsible for directing the operations of all the other components of the processor.

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

What does decoding mean in the CU?

A

Decoding means analysing the opcode and operand of the instruction.

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

What are some tasks of the CU?

A
  • Uses control signals to enable data to be read from and written to main memory.
  • decodes instructions that the processor will execute to determine what needs to be done.
  • organises sequence of micro-operations that need to be performed in order to carry out instruction.
  • Uses control signals to determine operation the ALU will carry out.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define Clock.

A

A timing device connected to the processor that periodically generates a signal to synchronise fetch, decode execute cycle runs and other components of the computer.

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

What does the Clock do?

A

The Clock generates a timing signal which changes at a regular frequency. This is used to synchronise communication between the components of the processor and the rest of the computer system.

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

What is the clock speed measured?

A

It is measured in Hertz.

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

What are Registers?

A

Registers are small storage locations used to hold data temporarily. They have high read and write speeds.

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

Define General Purpose Registers.

A

Special memory cells in the processor that can be accessed quickly. They temporarily store data and control information.

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

Define Special/Dedicated Registers.

A

A register reserved for a specific purpose or role essential to the running of the processor.

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

Give the names of the Special Registers.

A

PC, CIR, SR, MAR, MDR/MBR

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

What is the PC and what does it do?

A

Program Counter.
A dedicated register that stores the address of the next instruction to execute.

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

What is the CIR and what does it do?

A

Current Instruction Register.
A dedicated register that stores the address of the instruction that is being executed in the processor.

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

What is the SR and what does it do?

A

Status Register.
A dedicated register containing information about the intermediate states or outcomes of various processes in the processor.
Contains a number of bits. Each bit within the SR acts as a flag to indicate if an error or exception has occurred or to enable or disable interrupts.

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

What is the MAR and what does it do?

A

Memory Address Register.
A special register that stores the memory address of the next instruction to load or data to use.

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

What is the MDR/MBR and what does it do?

A

Memory Data Register/ Memory Buffer Register.
A special register that temporarily stores data to be read from or written to the computer’s memory.

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

What does FDE stand for?

A

Fetch Decode Execute Cycle.

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

Define FDE.

A

The process of fetching from memory (supplying the address and retrieving the instruction from memory), decoding (interpreting the instruction and then reading and retrieving the required data from their addresses ) and executing the instruction (CPU carries out the required actions).

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

What happens in the Fetch stage of FDE?

A

Fetch - CPU fetches data and instructions from RAM then stores in registers.
1. PC has the next instruction to execute.
2. PC copied to MAR, then copied to address bus.
3. Address bus carries address to RAM.
4. Data bus carries the instruction stored in the address location to the CPU, saved in the MDR/MBR.
5. PC increments by 1.
6. MDR/MBR is copied to the CIR.

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

What happens in the Decode stage of FDE?

A

Decode - CPU works out what the instruction means.
1. CU decodes the instruction in the CIR. Splitting into opcode and operand, determining the type of instruction or if any additional data is needed for the instruction to execute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What happens in the Execute stage of FDE?
Execute - Data processing happens. Once a cycle has completed, another starts. 1. Instruction is executed. e.g arithmetic instruction executed in ALU, result stored in ACC or back in RAM.
26
What happens between each FDE Cycle?
Between each execute and fetch stage of cycle, the contents of status register is checked if there is a need for interrupts.
27
Define Instruction Set.
A set of sequenced operations in machine code that can be recognised by a particular processor as the execution of a command.
28
Do different types of processors have the same instruction set?
Different types of processors have their own instruction sets, but may perform similar or identical operations.
29
What two components make up an instruction?
Opcode and Operand.
30
What is an Opcode?
The part of the instruction that explains what action the instruction performs.
31
What is an Operand?
The part of an instruction with a value, memory address or register that the instruction will act on during its execution.
32
What is an addressing mode?
An addressing mode is usually 2 bits of data that tells it the way the operand is interpreted.
33
What are the 2 types of addressing modes?
1. Immediate Addressing (00) 2. Direct Addressing (01)
34
Define Direct Addressing.
A form of addressing an instruction such that the operand is the address of the required datum (singular of data).
35
Define Immediate Addressing.
A form of addressing an instruction such that the operand is the required datum (singular of data).
36
What does it mean if the opcode is immediate addressing?
The operand will be treated as a value. Or can be shown as a value using the # sign.
37
What does it mean if the opcode is direct addressing?
The operand will be treated as an address. such as a memory location.
38
What are the types of instructions?
1. Data transfer - store, load 2. Arithmetic Operations - add, subtract 3. Comparison Operations - compare 2 values 4. Logical Operations - AND, OR, NOT 5. Branch - conditional(if), unconditional(break) 6. Shift Operators - shifts binary in register
39
Define the operation ADD.
A machine code instruction that adds a given value to the value of the register, and stores the sum in the specified destination memory address.
40
Define the operation Branch.
A set of machine code instructions that allow you to move to another part of the program either always (unconditional branching) or if a particular condition is met (conditional branching).
41
Define the operation Halt.
A machine code instruction that stops the execution of the program.
42
Define the operation Load.
A machine code instruction that loads the value stored in the memory address specified in the instruction.
43
Define the operation Store.
A machine code instruction that stores the value in a given register to the specified destination memory address.
44
Define the operation Subtract.
A machine code instruction that subtracts a given value from the value in a register, and stores the difference in the specified destination memory address.
45
Define Logical Bitwise Operators.
A set of machine code instructions designed to perform a specified logical operation (OR, AND, NOT...) on the value in a register value and a value given in the instruction, storing the result in the specified destination memory address.
46
Define Logical Shift.
A machine code instruction that can shift the value stored in a given register by a number of bits (also given in the instruction) left or right, and stores the result in the specified destination memory address.
47
What are some low Level language characteristics?
- uses the specific instruction set of a processor, the instruction set is defined by the manufacturer. - non portable -> does not run with different processors. - allows programmers to have individual control over specific components or registers -> higher efficiency. - programs require less memory and execute faster than high level language program.
48
What are the 2 types of low level languages?
1. Machine Code 2. Assembly Code
49
What is machine code?
Machine code is made up of binary 1s and 0s -> does not need to be translated before running. It is difficult for humans to write, read, debug and fix problems, usually hexadecimal is used to represent binary digits as easier to understand.
50
What is Assembly code/language?
They are mnemonics for instructions (represent the binary equivalent in machine code) They need to be translated - assembling by a program: Assembler. Can directly interact with main memory by 'calling' memory locations.
51
What are some advantages of low level languages?
- allows the programmer to create optimised programs - allows programmer to more directly control how resources are used in computer system - allows programmer to make use of specific registers, for greater efficiency
52
What are some disadvantages of low level languages?
- more difficult to write in low level than high level - not portable, specific to instruction set - do not have libraries or functions that can be imported like high level languages : programmers have to write every process themselves
53
Define Interrupts.
A signal sent by a program to request the processor for attention from the current task(s).
54
Define Interrupt Service Routine (ISR).
A block of code used by the processor to appropriately handle and deal with an interrupt if it chooses to accept it.
55
What is the role of Interrupts?
Interrupts are signals sent to the processor to temporarily halt its current task, allowing it to execute an Interrupt Service Routine(ISR). After handling the interrupt, the processor resumes its previous task.
56
What are the two ways of interrupts?
1. Polling 2. Interrupts System
57
What is Polling?
In Polling : The CPU checks with each peripheral device for attention (even when some devices do not require attention) -> inefficient process.
58
What is an Interrupts System?
A device sends a signal on the control bus to the CPU to indicate it requires attention.
59
What is the process of a typical FDE cycle including the interrupts?
Fetch -> Decode -> Execute -> Interrupts During the Interrupts stage: the CPU checks for signals from the control bus ; if there is an interrupt, the FDE cycle stops and an Interrupt Service Routine (ISRs) is run -> handles the interrupt
60
What is the problem created with the interrupts system?
If the PC is changed to run the ISR, how will the CPU know where to continue after the interrupt?
61
What is the solution to the problem created by the interrupts system?
A stack. The contents of the PC are copied to the stack, and the ISR replaces the PC. So the ISR is run. After running the ISR, the contents of the stack are copied back to the PC so the CPU can continue where it left off.
62
What are the priorities for the ISR?
The most updated / new interrupt will always execute first, even when running another ISR.
63
What are some types of interrupts?
1. Hardware - power button pressed - memory parity error 2. Software - illegal instruction - arithmetic overflow - new log - on request 3. Input Output - buffer nearly empty - signal the completion of data transfer to/from a device
64
What are the Factors affecting FDE cycles?
- clock speed - cache size - number of cores - bit of address bus - bit of data bus - word length
65
How does the factor clock speed affecting FDE cycles?
Clock speed is an electronic oscillator that produces a signal to synchronise the operation of the processor. The faster the clock speed, the faster the speed of instructions being executed. Unit is GHz. - Overclocking -> when the clock speed is more than the manufacture's recommended may lead to overheating and shorter lifespan of the device.
66
How does the factor cache size affect FDE cycles?
Cache is a relatively small capacity set of locations used to store frequently used data or instructions. Is volatile like RAM. Levels of Cache -> L1 smallest and fastest cache, sits on each core ; L2 shared by cores ; L3 slower but larger, on processor or motherboard ; L4 placed on or near processor. Cache reduces the time it takes for instructions and data to pass through system registers, so more efficient.
67
How does the factor number of cores affect FDE cycles?
The more number of cores, the more instructions it can execute simultaneously so more efficient. However other factors can also affect the efficiency of multicore systems. Parallel Processing - dividing a computational task into subtasks that can be processed in parallel - only on multicore systems.
68
How does the factor address bus width affect FDE cycles?
The width of the address bus determines the number of bits that can be used to form an address of a memory location. The larger the width of the address bus, the more memory locations can be addressed. It reduces the reliance on slower virtual memory. If the width of the address bus is n bits, then there are 2 ^ n of distinct memory addresses available for memory.
69
How does the factor data bus width affect FDE cycles?
The width of the data bus determines the number of bits that can be transferred to or from in one operation. The larger the size of the data bus, the higher the performance of the processor. The greater the width, the more data can be transferred between the internal components simultaneously. If the width of data bus is n bits, then n bits can be transferred between the internal components in one operation.
70
How does the factor word length affect FDE cycles?
The word length refers to the amount of data that can be handled at one time by the processor. A word is a group of bits that is treated as a single unit by a processor. Words can be used for representing both instructions and data. The larger the size of the word, the more amount of data can be transferred to CPU in one pass. The larger the word length, the less fetches of data from main memory, carrying out instructions faster.