X) Internal Components, Buses, System Architecture Flashcards
What is a bus?
A bus is a set of parallel wires that connect together components inside a computer in order to pass signals through.
The Control Bus
The control bus transports signals both ways between the Processor to the controllers.
The control bus ensures that the correct data reached the correct component at the right time. This involves the synchronisation of signals and the control of access to data and address buses.
Interrupts
An interrupt is a signal which is sent from either a device or a piece of software to the operating system.
The hierarchy of interrupts is where the interrupt handler priorities interruptions, placing them into a queue with the most important first.
Interrupts are useful because if they weren’t around, a user may have to wait a while for a given app as it is not given a higher priority for the CPU to run.
Data Bus
The data bus transfers data between the processor and memory, it also transfers data to and from the I/O controllers. The size of the data bus determines how much data can be transmitted in one pulse of the clock.
The data bus width is the same as the word length of the processor.
Word length- the number of bits transferred as a unit.
Address Bus
The address bus is used to specify the physical address in memory so the data bus can access that address.
The address bus only goes in one direction- from the processor to memory.
The size of the address bus is measured in bits and represents the amount of memory that is addressable.
Addressable Memory
Addressable memory is the concept that data and instructions are stored in memory using discrete addresses (an unsigned binary number).
Data is stored in a specific location and the CPU, using the address bus, controls what is stored in each location.
Each address is assigned 8 bits of data, like a dictionary (Address: Data).
Embedded systems
An embedded system is one where there is a computer that has a specific job within a machine.
Digital Signal Processing (DSP)
Digital Signal Processing is the process of manipulating different types of signals with the intention to produce analogue signals.
DSP is used where the computer is continually monitoring analogue signals and turns them into digital signals to feed into a wider system.
For example; Thermostat, you continually check the temperature (analogue signal), then turning it into a digital signal as you turn up/down the heat.
The CPU
The central processing unit carries out computation on data by following instructions in order to produce an output.
Buses inside the CPU connect groups of transistors, the transistors are used to control the flow of electrical pulses timed by the computer’s clock.
The speed of the CPU is measured in GHz.
Main memory
Main memory stores both data and programs which are currently used by the processor.
RAM- stores data and can be read to and written from.
This is temporary storage (volatile), with 8 chips each made up of millions of cells each containing its own unique address. Each cell contains either an instruction or some data.
ROM- stores data that can be read from, but not written to. ROM is non-volatile and so stores a certain amount of information including the set-up of the computer and the BIOS. It checks that all hardware devices are plugged in and it loads parts of the operating systmem.
Input/ Output Controllers
The I/O controllers are responsible for receiving and sending instructions to various input and output devices.
Harvard Architecture
In Harvard architecture, the instructions and data are stored in separate memory units each with a different bus connected to the CPU.
While data is being written to memory the next piece of data can be fetched.
Von Neumann Architecture
In Von Neumann architecture the instructions and data share the same memory space and are served by one set of buses.
- The information and data are stored in the same format, so there is no difference between the two forms when u look at its binary format.
- Follows a linear fetch, decode and execute cycle and processes one instruction at a time.
- Registers are used as fast access to data because it is quicker to handle data in the CPU than working with it directly in memory.
Harvard vs Von Neumann
Harvard:
+ives:
- Data is handled faster
- Can access instructions and read/write simultaneously.
- ives:
- More costly
- Must use separate buses for transferring data
Von Neumann:
+ives:
- Cheaper in cost
- Same physical memory address is used for instructions and data.
- ives:
- Two clock cycles required to execute an instruction
- Can not simultaneously access instructions and read/write.
The Fetch-Execute Cycle
The fetch-execute cycle is the process carried out by the processor when running programs. Each instruction is fetched from memory, decoded and then executed.
Before this process can be carried out the program instructions must be translated into machine code and instructions must be loaded from secondary storage to main memory.
The Fetch Stage
When an instruction wants to be fetched from the main memory, the PC keeps the address for the next instruction being executed. The contents of the PC is then copied to the MAR which is connected to the address bus.
Once the address instruction is on the address bus, the CU instructs a memory read operation to allow the contents of the memory location to be transferred to the processor.
Simultaneously, the contents of the PC are incremented by one so that they point to the address of the next instruction.
The contents of the memory data register MDR are copied to the current instruction register CIR. This ensures that the current instruction is kept safe so that the MDR can be used during the execute stage.
The Decode Stage
The control unit decodes the instruction that is kept in the current instruction register (CIR). The instruction is split into operand and opcode to determine what type of instruction needs to be carried out and figuring out and where these are kept in main memory.
The Execute Stage
The instruction is executed, the exact sequence of operands depends on the type of instruction that is executed.
The Control Unit (CU)
The control unit is a part of the processor which manages the execution of instructions.
The Arithmetic Logic Unit (ALU)
The arithmetic logic unit is part of the processor which carries out mathematical functions.
The ALU uses logical operations such as OR, AND & NOT to carry out the appropriate process required.
The Clock
The clock is a device that generates a signal used to synchronise the components of a computer.
Registers (Status and Interrupt)
The status register keeps track of the various functions of the computer.
The interrupt register stores details of any signals that have been received by the processor from other components attached to it. It also stores details of incoming interupts.
Register
Four registers used by the fetch-execute cycle
- A register is a small section of temporary storage that is in the processor. It stores data and control instructions used in the fetch-execute cycle.
- The Current Instruction Register (CIR) stores the instruction that is currently being executed.
- The Program Counter (PC) stores the memory location of the next instruction that will be needed by the processor.
- The Memory Data Register (MDR) holds the data that has just been read from or is about to be written to main memory.
- The Memory Address Register (MAR) stores the memory location where data in the MDR is about to be written to.
Machine Code
In machine code, an instruction holds an operation code (opcode) in the first 4 bits and the operand ( the address where the data is held) in the second 4 bits.