7 - Fundamentals of Computer Organisation and Architecture Flashcards
Explain the role of the Arithmetic Logic Unit.
The ALU is part of the processor that processes and manipulates data. It performs arithmetic and logical operations on data supplied in registers, storing the result in a register.
Explain the role of the Control Unit.
The CU controls operation of the fetch-decode-execute cycle and sends control signals to other components of the cycle.
Explain the role of general-purpose registers.
General-purpose registers have no specific purpose and can be used by the programmer to store data, as needed.
Explain the role of the clock.
The system clock is a unit inside the processor that provides regular clock pulses that are used to sequence the operation of the processor and the movement of data around the other components of the computer.
Explain the role of the Program Counter.
The PC stores the memory address of the next instruction to be fetched and executed and is incremented as part of the fetch-decode-execute cycle.
Explain the role of the Current Instruction Register.
The CIR stores the instruction that is currently being executed by the processor. The “decode” step is also performed on the CIR.
Explain the role of the Memory Address Register.
The MAR stores the memory location where data in the MBR is about to be written to or read from. This is also the processor’s direct connection to the address bus for accessing main memory.
Explain the role of the Memory Buffer Register.
The MBR holds the data that has just been read from or is about to be written to main memory. This is also the processor’s direct connection to the data bus for accessing main memory.
Explain the role of the Status Register.
The SR stores single bit condition codes each of which indicates the outcome of arithmetic and logical operations carried out in the ALU, for example an arithmetic operation may produce a positive, negative, zero result, a carry or overflow and the corresponding condition codes are set (made 1).
What are registers?
Registers are memory locations within the processor that support fast access as well as rapid manipulation of their contents.
What are the major components in a processor?
- Arithmetic Logic Unit
- Control Unit
- Clock
- General purpose registers
- Dedicated registers, including:
- Program Counter
- Current Instruction Register
- Memory Address Register
- Memory Buffer Register
- Status Register
Explain how the Fetch-Execute cycle is used to execute machine code programs.
A machine code program is made up of machine code instructions which are fetched from main memory, one at a time, and executed in the processor.
Describe what happens in the Fetch stage of the Fetch-Execute cycle.
1) The address of the next instruction to be executed (held in the PC) is copied to the MAR.
2) The address bus is used to transfer this address to main memory.
3) The instruction held at that address in main memory is transferred via the data bus to the MBR.
4) The contents of the PC are incremented to hold the address of the next instruction to be executed.
5) The contents of the MBR are copied to the CIR. This frees up the MBR for the execute phase.
Describe what happens in the Decode stage of the Fetch-Execute cycle.
- The instruction held in the CIR is decoded by the CU.
* The instruction is split into opcode and operand.
Describe what happens in the Execute stage of the Fetch-Execute cycle.
- The opcode identifies what type of instruction it is.
- Instructions are executed by the relevant part of the processor.
- Further memory fetches are carried out if required.
- For maths or logic instructions, the ALU executes the instruction.
- The result of computation is stored in the accumulator.
- The status register is updated.
Describe the role of interrupts.
An interrupt is 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 process associated with the interrupt.
Describe the role of Interrupt Service Routines.
An ISR is a small program designed to respond to each interrupt. These can be provided by either the operating system or I/O device drivers.
Describe the effects of interrupts on the Fetch-Execute cycle.
1) The processor receives the interrupt.
2) The processor completes the Fetch-Execute cycle of the instruction that it was running when it received the interrupt.
3) The current contents of the processor registers (including the PC) are saved to memory.
4) The origin of the interrupt is identified so that the appropriate ISR is called.
5) All other lower priority interrupts are put on hold to allow the ISR to finish running.
6) The PC is updated with the address of the first instruction of the ISR.
7) The ISR completes its execution.
8) The processor registers are reloaded with the values that were saved to memory.
9) The lower priority interrupts that were put on hold are re-established.
10) The PC is set to point to the address of the next instruction that needs to be executed in the program that the processor was running when it received the interrupt.
What is a volatile environment?
A volatile environment is a snapshot of the information needed to execute a process from its current instruction. This contains the special purpose and general purpose registers (including the PC).
Explain what happens when an interrupt occurs?
The volatile environment is saved on the stack. The source of the interrupt is identified so the appropriate ISR is called. After the ISR has finished its execution, the volatile environment is restored.
Why is it important to save the volatile environment while the interrupt is being serviced?
Running the ISR causes the contents of processor registers to change. Unless the volatile environment is saved before these changes occur, restoring the contents of the affected registers will be impossible as will returning the processor to the exact state it was in just before executing the ISR.
Name 6 factors that affect processor performance.
- Multiple cores
- Cache memory
- Clock speed
- Word Length
- Address bus width
- Data bus width
Explain the effect on processor performance of multiple cores.
By having multiple cores in a computer system, parallel processing can take place. This is where a task is split up into different parts which are executed at the same time in different cores. Therefore by increasing the number of cores, the speed of execution is increased (as long as those instructions can be executed in parallel).
Explain the effect on processor performance of cache memory.
The cache is a small amount of fast memory placed near the processor which stores copies of data from frequently used memory locations, data to be written to main memory and pre-fetched instructions. The cache can be accessed much faster than main memory. By increasing the size of the cache, more data and instructions can be stored there, resulting in programs being able to run faster.
Explain the effect on processor performance of clock speed.
A processor executes a particular instruction in a set number of clock ticks or clock cycles. Therefore increasing the clock speed causes instructions to be executed at a faster rate.
Explain the effect on processor performance of word length.
Increasing the word length means that the processor can handle more data per instruction. This is useful as processing an instruction may require multiple fetches of data from main memory. Therefore, by being able to pass larger amounts of data to the processor with every pass, the system is likely to carry out instructions faster. Increasing the word length means that the processor can access a larger amount of memory through direct accessing and could also allow the processor to have a larger instruction set.
Explain the effect on processor performance of the address bus width.
The size of the address bus represents the amount of unique memory locations that are addressable. Increasing the width of the address bus will increase the number of addressable locations and therefore allows more memory to be installed on the computer.