Computer Science Flashcards
What does the address bus do?
Carries a memory address of an instruction in the main memory to be read and carried back to the CPU
What does the control bus do?
Directs and monitors components in the computer by sends signals from the CPU such as read/ write signals to the RAM.
What does the ALU do?
Arithmetic operations, logical comparisons, boolean logic and logical shifts. Include examples of each
How is an instruction split up?
Opcode: what needs to be done (add)
Operand: what it is being done to (data)
What happens in fetch part of the cycle
Next instruction copied from PC to MAR
CU loads it onto the address bus and sends a read signal through the control bus
Instruction sent from RAM to MDR by data bus
Copied to CIR
PC incremented by 1
What happens in the decode part of the cycle?
CU checks that the instruction is recognised, reads it and prepares the CPU for execute
What happens in the execute part of the cycle?
Uses the ALU to manipulate data and might store in the accumulator
May write to RAM, load more data from RAM etc
What does the clock do?
Constantly ticks by varying power to the CPU to synchronise actions in the CPU. Higher clock speed means more instructions per second
What does multicore mean?
Multiple processing units on a single Cpu chip that can process instructions separately at the same time.
What is pipelining?
When cores are assigned fetch, decode and execute. Each instruction is passed through each core for each stage of the FDE cycle
What is the difference between SRAM and DRAM?
Static RAM is more expensive and faster found in cache
Dynamic RAM is used in main memory and needs a constant refresh signal to keep capacitors charged
What characterises a Von Neumann computer?
Data and software stored together sharing bus
CU, ALU, registers
Way to input and output information
What characterises harvard architecture?
Separate memory for data and instructions
Data and instructions can be fetched at the same time with separate busses
More physical space needed
More expensive
Harder to handle two blocks of RAM
CISC vs RISC
Larger vs smaller instruction set More vs fewer transistors required More vs less heat More vs less like 1 to 1 with machine code Many vs one cycle per instruction Worse vs better for pipelining
What causes the CPU to flush the pipe?
When the CPU doesn’t precict a branch in code, the pipe is flushed to process the new instruction
What is SIMD processing?
Single instruction multiple data.
When data is arranged into an array or matrix and multiple ALUs perform the same or similar tasks on each of them. Cannot be done on sequential programs.
What is MIMD?
Multiple instruction multiple data.
A job scheduler assigns each processing core part of a task to do. It isn’t always possible to split every problem into as many parts as there are cores.
Storage device vs storage media
Storage device:
Writes data (DVD writer)
Storage media:
Stores data (DVD)
Attributes of magnetic storage:
Magnetic particles store data and read/write heads float over spinning platters. High capacity, low cost per gb, random access, good longevity.
Not that portable, moving parts, slow, loss of data in strong magnetic fields
Attributes of optical storage:
Laser burns puts into a disc and another laser reads it.
reflected/ scattered light represents 1s and 0s.
Cheap, good capacity for intended use, portable. Expensive for high capacity, slow read/ write easily scratched, no random access, cannot write over data.
Attributes of flash storage:
Electronic switches hold electric charge. Fast, high capacity, portable and durable, silent. Expensive, wears out after lots of use.
What is virtual storage?
When many storage devices are put together and a virtual storage controller makes them appear as one location. Used for high capacity requirements.
Purpose of an OS
Scheduling
Manages memory- loads programs, reuses memory and creates VRAM
Manages peripherals- handles I/O reqs, drivers
Utility programs
Security- logins, access to other user’s files
Provides a UI
What does the kernel do?
Loads/unloads programs from RAM Scheduling tasks for the CPU Memory management Handles files in/ out of secondary storage Data security File management