5.2 - The Processor Flashcards
What is the processor?
The central component of a computer system that performs computations and executes instructions from programs in order to run applications
What are the different components of the processor?
- ALU
- CU (control unit)
- clock
- general purpose registers
- dedicated registers
What does the ALU do?
Performs arithmetic, logical and shift operations on data
Arithmetic: add, subtract, multiply, divide
Logic operations: AND, OR, NOT, XOR
Shift operations: move bits to the left (multiply by 2) or right within a register
What does the the control unit do?
Part of the processor that coordinates the activity of all the components:
- instructions are accepted/decoded
- identifying steps such as fetching address of data or data itself
- synchronised each part of processor by the pulse of the system clock
What is the system clock? What does it do?
Generates a timing signal which changes at as regular frequency
This signal is used to synchronise communication between the components of the processors and the rest of the computer system
What are the general purpose registers?
Several locations of super fast memory to temporarily store results of the ALU
The ACC is a single general purpose register used by some processors
What are the 5 types of dedicated registers? Why do we have them?
They help hold snippets of information needed by the processor:
Program counter (PC) - holds the memory address of the next instruction to executed unless a branch occurs so the value must change
Memory Address Register (MAR) - holds the address in memory where the processor is required to fetch or store data from or to
Memory Buffer Register (MBR) - temporarily holds data moving between the processor and main memory
Current Instruction Register (CIR) - holds the current instruction being executed
Status register (SR) - holds information about the current state of operations. Sets flags like carry or overflow/detect error conditions
What is the fetch-decode-execute cycle?
1) Address of next instruction transferred from PC to MAR
2) PC is incremented by 1
3) Instruction stored in location addressed by MAR is transferred MBR
4) Instruction transferred from MBR to CIR
5) Instruction in CIR is decoded by CU
6) Additional data, if required by the instruction, is fetched from memory and passed to the registers
7) Instruction is executed by the ALU
8) Registers are used to store intermediate data or results
9) The result is stored in the accumulator or general purpose registers or memory
10) After each FDE, SR is checked for any changes which could signify an interrupt has occurred
What factors affect the performance of the computer?
- clock speed
- amount of cache (fast memory used to store data frequently used by processor, slower than registers but faster than RAM)
- number of cores
- word length (amount of data CPU can process simultaneously)
- address and data bus width
What is an interrupt?
A signal sent to the processor by another part of the computer requesting the attention of the processor
When does a software interrupt occur?
When application program terminates or requests certain services from the OS
What types of hardware interrupt occur?
When an I/O controller alerts the processor the mouse has been moved or an error such as “printer out of paper” occurs
When are tests for interrupts conducted?
At the end of each instruction cycle
What is the interrupt service routine?
When a particular routine is run to service an interrupt depending on the type of interrupt
After it has been serviced the original value is retrieved and the cycle resumes where it left off