Topic A Flashcards
What are the levels in a personal computer system?
User → System/Application software → OS → Hardware
Describe The Von Neumann Model
- Input device is used to load program instructions & data into memory
- CPU fetches the program instructions from memory, processes the data and generates results
- Results are sent to an output device
What is the stored program concept?
- That programs and data is both stored in memory.
- Programs are loaded into the CPU when they need to be executed
What is the role of the clock?
What are clock cycles measure in?`
To drive the CPU, it operates on a certain cycle in terms of speed of a CPU
Measure in Gigahertz
Name the components in a modern system
- Clock
- CPU
- I/O devices
- System BUs
- Memory subsystem
Describe how the components in a modern system cooperate
- The clock drives the CPU, at every clock beat the CPU will fetch instructions from memory.
- The CPU is connected to a system bus (set of wires).
- All devices are connected to the same system bus. This transfers data between the CPU and everything else
- The memory subsystem is connected to the system bus so the CPU can read/write data into memory
What is the system bus?
A collection of wires that allow communication between various components on the motherboard
What is the alternative to the system bus and how does it work?
The point-to-point system - where each component is wired to all the others
- don’t use this as it’s more expensive and complicated
What is bus contention?
- Only one piece of data can be in one position on the bus at a time.
- If all the buses want to communicate simultaneously, as would be normal in a modern system there must be a system to manage who has access to which bus when.
What are the 3 buses and what is their function?
- Address bus: used to specify a memory address to be accessed in memory
- Data bus: used to carry a value to be transferred
- Control bus: used to tell the receiver what to do
Give examples of I/O devices?
- Audio and video cards
- Printers
- scanners
- disk drives
- keyboards
- mouse
When performing I/O, what information does the CPU need to know?
it needs to know:
- When a device is ready to receive / transmit
- When a device has completed a request
What is polling?
Polling is periodically checking the device status of all the I/O devices
- so it knows when a device is ready to transmit and receive data and when it has completed a request.
(however this is not a good use of CPU time)
When are interrupts used regarding I/O?
A device sends a signal when it is ready, interrupting the CPU activity and causing an interrupt handler to be invoked
Prior to being processed what must happen to all data and programs?
They must be converted into binary form and brought into the computer memory (so it can be stored properly)
Name the 3 types of memory
- RAM (Random access memory) allows you to read and write data to it randomly. it’s volatile
- ROM (Read only memory) it’s non-volatile and stores system boot code
- Flash allows you to read and write data to it. Non volatile, used in pen drives and SSDs
What does volatile mean?
Everything is lost when the power is turned off
What is stored in ROM?
A very small program that’s used to load the OS into RAM
How can we picture memory + explain the diagram
- Filing cabinet, each file has an associated (byte) number.
- can think of this as a sequence of ‘words’
- each word holds its own content
- each words has it’s own unique memory address, which points to four bytes (32 bits)
- So each row on the diagram = 4 bytes of memory known as a word.
- If we want to move to the next piece of data in memory we add 4 onto the memory address.
- most modern systems are byte addressable
What is a word formed from?
- formed from one or more bytes
- individual bits are zero-indexed from right to left
- Bit zero is the least significant bit
What are the components of the CPU
- CU (control unit)
- ALU (arithmetic logic unit)
- Registers (16 in total)
- 4 general purpose registers A,B,C,D
- Instruction register and instruction pointer
- Interface to main memory
- MAR and MDR
What does the control unit do?
it fetches instructions and works out what do with them
What does the ALU do?
Performs numeric and logical bit-manipulation operations.
What does the instruction pointer do?
The instruction pointer (or program counter) points to the next instruction to be executed
What does the MAR do?
The MAR stores the address of something we want to write to or retrieve from RAM
What does the MDR do?
The MDR stores the data retrieved from RAM that was in the address stored in the MAR
Why do we use registers?
It’s much easier to manipulate the registers than it is main memory, which is comparatively much slower to get to read/write to.
What are registers
They are temporary storage locations internal to the CPU
What does the Instruction register do?
It holds the current instruction to be executed
Which two registers are used to interface with main memory?
The MAR and MDR. The CPU manipulates these two registers. They can’t be accessed by programmers.
What are the steps of the Fetch Decode Execute Cycle
Step 1: Contents of the PC are copied into the MAR. The address in MAR is sent down the address bus to RAM
Step 2: Contents of specified memory address are sent down the data bus to the MBR. The PC is incremented by 1 to point to the next instruction.
Step 3: Contents of the MBR are copied to the CIR
Step 4: Decode Instruction register by splitting it into opcode/operand.
Step 5: Fetch any operands
Step 6: Carry out execution
Step 7: repeat process
How many bits would we add to increment the program counter in 32 and 64 bit systems?
- Add 4 bits in a 32 bit system
- Add 8 bits in a 64 bit system