4.7 Computer organisation and architecture Flashcards
Name the 3 main internal components of a computer system (three box model)
- Processor
- Main memory
- Input/output (I/O) controllers
What is a system bus? What sort of information can it represent?
- A system bus is a set of parallel wires connecting independent components of a computer system
- They are used to pass signals between components, which can represent data, address or control information
What is data bus used for? What’s its direction?
The data bus is used to transport data between components.
The data bus is bidirectional
What is address bus used for? What’s its direction?
The address bus is used to address memory and I/O (input output) locations.
The address bus is unidirectional
What is control bus used for? What’s its direction?
The control bus is used to transport control signals between components.
The control bus is ← bidirectional →
3 examples of control signals
- Clock signals
- Memory read
- Memory write
What are I/O controllers?
The circuits that connect a system bus and an I/O device. (Providing correct currents/voltages etc.)
Difference between volatile and non-volatile memory
- Volatile maintains its data only while the device is powered.
- Non-volatile retains stored information even after power is removed
Example of volatile memory
RAM (Random Access Memory)
Example of non-volatile memory
ROM (Read Only Memory)
What is the stored program concept?
- A program has to be resident in main memory to be executed
- Machine instruction codes are fetched sequentially and executed one at a time by the processor
4 differences between Von Neumann and Harvard architecture
VN: Uses one memory unit for both instructions and data
H: Has separate memory units for instructions and data
VN: Uses one set of buses for both instructions and data
H: Has separate buses for instructions and data
VN: Commonly used in general purpose computers
H: Commonly used in embedded systems (e.g. digital signal processing)
VN: Enables a more flexible use of main memory, enabling the processor to run a variety of programs that aren’t necessarily known in advance
H: For systems with a predetermined use, instruction memory can be implemented as ROM which protects the programs from hacking
What happens in each of FDE stages? (short answer)
Fetch - the next instruction is copied from main memory into the processor
Decode - the instruction gets decoded based on the processor’s instruction set
Execute - The instruction gets executed (carried out)
5 steps for fetch in FDE
- Contents of the PC is copied into the MAR
- The address bus is used to transfer this address to main memory
- The instruction held at that address is transferred via the data bus into the MBR
- The contents of the MBR are copied into the CIR
- The PC is incremented to hold the address of the next instruction to be executed (not always +1 e.g. if word length is two bytes)
What happens in decode stage of FDE?
- The instruction held in the CIR is decoded by the control unit
- (by checking its binary value correlates to an operation in its instruction set)
What is the instruction set? (2*)
- The set of binary codes for the machine operations that a processor has been designed to perform.
- It is specific to the processor
3 examples of what might happen in the execute stage of FDE
- The ALU is used for maths and logic instructions
- The MAR and MBR are used to access data from main memory for
LOAD
andSTORE
instructions - The general purpose registers and status register are updated during this step
What is the purpose of main memory?
Main Memory holds the instructions and data currently being used by the processor.
What is the ALU?
The Arithmetic Logic Unit is the part of the CPU that is responsible for arithmetic operations (e.g. addition, subtraction, binary shifts) and logic comparisons (e.g. Or / And / Not)
What is a register?
Extremely fast, very small, on chip memory for temporary storage of binary values
What does the program counter do?
Holds the address of the next instruction to be executed
What does the MAR do?
- Holds the address of the memory location that data will be read/written to
- The MAR is the processor’s direct connection to the address bus for accessing main memory
What does the MBR do?
- Temporarily stores data read from or written to main memory
- The MBR is the processor’s direct connection to the data bus for accessing main memory
- Holds the instruction in the fetch stage before it is copied into the CIR
What is the role of the CIR in the FDE cycle?
- Stores the current instruction
- The control unit performs the decode step on the CIR by checking its binary value correlates to an operation in its instruction set
What information is stored in the status register?
- The status register contains many bits (binary flags) that are set (1) or cleared (0) depending on the result of an instruction
- Each bit represents a boolean value, for example if an overflow error has occurred
What is the purpose of general purpose registers?
- Have no specific purpose
- Usually used as temporary storage while performing arithmetic operations
- Often store the operands of processor instructions
What is a processor interrupt?
- A signal that is sent to the processor to request immediate attention
- When the processor receives an interrupt, it suspends what it is doing and runs the programs associated with the interrupt
4 causes of processor interrupts
- A hardware device that has data ready to process
- A hardware device that has completed a task it was asked to do
- A pre-set timer expiring
- A hardware failure occurring that needs to be addressed
What is a ISR?
- ISRs are small programs designed to respond to each interrupt
- The operating system has interrupt service routines to handle each interrupt
- ISRs are provided by the OS or I/O device drivers
What needs to happen for an ISR to be run safely?
The processor’s volatile environment needs to be saved while the ISR is running