Looks like no one added any tags here yet for you.
What is the Von Neumann architecture?
it's when instruction data and program data are stored in the same memory
What is the CPU ?
Central Processing Unit, responsible for processing instructions given to a computer
What does the CPU consist of ?
- Arithmetic Logic Unit
- Control Unit
- Cache Memory
What is a bus ?
the connection between the processor, memory and input-output devices → buses are a communication system used to transfer data between components
What are the 3 types of buses ?
- address bus
- data bus
- control bus
What is the system bus ?
made up of the data bus, address bus, and control bus
What does unidirectional mean ?
data only flows in one direction, from the processor to memory and input-output devices
What does bidirectional mean ?
data flows in both directions, from the processor to memory and input-output devices
What is the address bus ?
a unidirectional bus that transmits the address from the processor to memory and input-output devices
What is the data bus ?
a bidirectional bus used to transmit data and instructions between the processor, memory and input-output devices
Features of the data bus ?
memory is divided into several fixed segments called words
- words can be 16,32 or 64 bits depending on the processor usually relative to operating system
What is the control bus ?
a bidirectional bus that transmits timing, status signals and commands between the processor, memory and input/output devices
What are the different control signals ?
- clock
- memory read
- memory write
- bus request
- bus grant
- interrupt request
What does clock do ?
synchronises the operations on a computer
What does memory read do ?
the contents in the specified address is copied to the data bus
What does memory write do ?
the contents in the data bus is copied to the specified address
What does bus request do ?
a device requests to use the data bus so that it can perform the Read/Write operation
What does bus grant do ?
the signal from the processor indicating that the device is granted access to use the data bus
What does interrupt request do ?
a signal sent from a device or software to the processor which temporarily stops the current process and initiates an interrupt service routine
What are the different registers ?
- program counter (PC)
- current instruction register (CIR)
- memory address register (MAR)
- memory data register (MDR)
- status register (SR)
- accumulator (ACC)
What does the program counter do ?
holds the address of the next instruction to be executed
What does the current instruction register do ?
holds the current instruction being executed
What is the instruction made up of ?
- opcode → what to do with it
- operand → what to do it to, can contain actual data or address where data is found
What does the memory address register do ?
holds the address of the register from which data is read, or to which data is to be written
What does the memory data register do ?
temporarily stores the data being read from or written to the memory
What does the status register do ?
holds the bits that are set or cleared based on the result of an instruction
What is the memory unit ?
consists of partitions which contain data and an address
What does the address do ?
uniquely identifies every location in memory and the contents are in binary form.
How does the READ operation work ?
address you want to copy contents from is copied to the MAR a read signal is then sent by the processor to the memory, contents are then copied to the MDR
How does the WRITE operation work ?
data is first written to the MDR and then the address of where you're writing to is written to the MAR, a write signal is sent by the processor to the memory unit through the control bus and the location is written to with data in the MDR
What does the Arithmetic Logic Unit do ?
responsible for arithmetic functions e.g. addition and logic operations e.g. AND, OR, NOT, etc
What is the Accumulator ?
the register that stores the result of arithmetic and logical operations performed by a processor
What does the Control Unit do ?
responsible for controlling the memory, processor and input-output devices, contains CIR and PC
Main function of the Control Unit ?
reads the instructions from the memory, decodes it and sends control signals to the memory and input-output devices
What is an input device ?
converts the signals sent by humans into a form that can be understood by the computer e.g. keyboard
What is an output device ?
convert the information from the computer into a form that is understandable by humans e.g. printers
What is the I/O (input/output) controller ?
responsible for receiving the requests from the processor and sending control signals to the device specified for that operation
What does an I/O controller consist of ?
- an interface to connect it to the system or I/O bus
- a set of data, command and status registers
- an interface that connects it to the cable connecting the device and the processor
What is the fetch decode execute cycle ?
to carry out the instructions, the processor fetches the data and instructions from the memory and stores it in suitable registers, these instructions are decoded and then executed
What happens in the fetch stage ?
program counter contains the location of the
instruction that is to be executed next, this address
is copied to MAR, instruction is then fetched from the memory and copied to MDR first, then the contents of the MDR are copied to the CIR, the value in a program counter is incremented by 1 and, hence, the instruction in the next memory location is processed
What happens in the decode stage ?
instructions are decode so that it can be executed
What happens in the execute stage ?
the processor sends control signals to the memory unit and input-output devices using the decoded instruction
Example of an interrupt ?
e.g. when paper is jammed in a printer, the CPU prompts the user to check the status.
Benefits of an interrupt ?
allows computer to carry out many tasks at the same time
How does an interrupt work ?
when the interrupt is serviced, the status of the
current job is saved, the contents of registers; PC and
CIR are saved on to the system stack, once it's serviced the current job is serviced according to it's status from before it was saved
What is a vector ?
points to the code that's associated with that interrupt
What is the vectored interrupt mechanism ?
processor identifies type of interrupt and then points to vector and processes the interrupt service routine
How to fix issue of an interrupt being serviced in the middle of another interrupt ?
- save the status of the current interrupt processing and proceed to service the new interrupt
- set priorities
What are priorities for interrupts ?
it can be decided whether the current interrupt service should be paused or not e.g. low battery should be high priority