1/39
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
RAM
Random Access Memory - temporary place to store material that works quickly. Volatile: erased when computer turns off. Directly accessible to CPU
What does the random in random access memory mean?
Any data chosen at random would be equally quickly accessible as any other data
Von Neumann Architecture
A processor where data and instructions are stored in the same memory and accessed via buses. It is a computer architecture that allows a machine to be programmable - to store programs instead of just doing one job
Registers
Registers are immediate access, small amounts of fast temporary memory within the processor
MDR vs MAR
MDR (Memory Data Register - holds data/program instruction when it is fetched from memory or data that is waiting to be written to memory)
MAR (Memory Address Register)
Problem and solution of bottlenecking in Von Neumann Architecture
Data and Program instructions are stored in the same memory (Harvard architecture stores in different locations). This results in bottlenecking, where the CPU is waiting for the data bus as it is busy carrying both program instructions and data. To solve this, you can use cache: a small amount of high-speed random-access memory (RAM) built directly within the processor. It is used to temporarily hold data and instructions that the processor is likely to reuse. This allows for faster processing as the processor does not have to wait for the data and instructions to be fetched from the RAM.
Address bus
Carries addresses from the processor to other components: uni directional.
Data bus
Carries data/instructions in both directions between the CPU and other devices: bi-directional.
Control bus
Carries control signals in both directions between the CPU and other devices: bi-directional.
What does more wires on buses mean
Number of wires is the bandwidth. Each wire represents a 1 or 0, so more wires can represent more memory addresses for the address bus
The size of the address bus determines how much memory the CPU can address directly. 64 bits can access 2^64 = 18.4 exabytes of memory, and 32 bits can access 2^32 = 4GB of memory.
What is the instruction set
Set of all operations that can be executed by a processor
Fetch-Decode-Execute Cycle definition
The process that the CPU uses to retrieve and execute instructions
Fetch
Control bus sends a read signal to the RAM (as well as carrying the clock pulses). The value in the program counter is placed in the Memory Address Register (MAR). A one-directional address bus carries the value of the MAR to the RAM and a data bus carries the value back to the CPU. The value is placed in the Memory Data Register (MDR), which is then placed in the instruction register as it is an instruction. Now the program counter (holds the address of the memory location storing the next instruction) is incremented (by the control unit) to fetch the next instruction.
Decode
The control unit decodes the value in the instruction register (a binary value) into opcode and operand. The first is the instruction and the second is data, or address value (e.g., load 6). The instructions are from a specific instruction set (set of all operations that can be executed by a processor)
Execute
Executes instruction
Example instruction #1:
The code says to LOAD 6, so the control units sets the Memory Address Register to address 6 and the CPU sends an address bus to the RAM for address 6. The RAM sends a data bus back and the value at address 6 is stored in the Memory Data Register (as it's not an instruction, you don't put it in the Instruction Register) and then copied into the Accumulator.
Example instruction #2:
SUB 4 would mean to subtract whatever is at location 4 from what's in the accumulator. This would require the use of the ALU. Any arithmetic/logical operations are performed by the ALU (Arithmetic Logic Unit), and the results are in a special purpose register called the accumulator.
Example instruction #3:
If you then wanted to transfer that result in the Accumulator back into RAM, the MAR would be set to the target address and MDR would be set to whatever value is in the Accumulator.
Clock
In one clock tick, FDE cycle happens once
Carried by control bus
For GCSE the clock is located on the CPU (in reality a system clock is on the motherboard, and the CPU clock multiplies up the system clock).
Clock speed
How many instructions the CPU can process each second, measured in Hz
Overclocking
Running the CPU at a speed faster than the manufacturer recommends (need to control heat produced or will cause damage)
Cores
Cores are processing units within the CPU which can carry out their own FDE cycles
Volatile memory
The entire contents of this type of memory are erased when you turn off the computer
Non-volatile memory
Memory that can retain the stored data even when not powered
BIOS & its function (including where it's stored)
Basic Input/Output System
When your computer switches on, the BIOS is the first to operate. It is fetched from ROM (small chip of read only memory - can be overwritten with a firmware update) to RAM, where the CPU can use it. The BIOS switches everything on and checks all hardware is working. It then instructs to load the Operating System from secondary storage to RAM and the CPU executes this to start the computer.
ALU - Arithmetic and Logic Unit
Does all mathematical calculations and makes all logical decisions
Control unit
The part of the central processing unit that controls the flow of information through the processor.
Magnetic Storage description
The HDD has a stack of metal platters that spin at high speed. The platter has a magnetic coating on both sides. The disc spins continuously and the drive head writes data by changing the surface to N & S. A change in polarity is a 1 and the same polarity is a 0. There are concentric tracks which are subdivided into sectors
E.g., magnetic tape, floppy disk
Magnetic storage advantages
Cheapest per gigabyte, therefore high capacity
Magnetic storage disadvantages
Not fast due to moving parts, but faster than optical
Will slow down and eventually break over time
Easily damaged
Optical Storage description
CDs, DVDs, Blu-rays (double layer blue ray 50GB) - small capacity, cheap, good for distribution
Lands and pits are burned into the disk
Photodiode detects reflections of surface, with a change between pit and land = 1 and everything else = 0.
Types:
- ROM
- R (write to once)
- RW (read or write)
Optical storage advantages
Only good for distribution - cheap, easy to produce, durable, lightweight, easy transport
Optical storage disadvantages
Slow
Small capacity
Can lose data when scratched
[Now becoming obsolete due to streaming services and cloud backups, so modern laptops often don't have optical drives]
Solid State storage description
NAND Flash memory cells trap charge (electrons) in pools which stays inside when the computer is off. To read, a small voltage is applied, and if the electron pool is empty, a 1 is read out of the transistor. Discharged = 1, charged = 0
Advantages of solid state storage
Very fast
Uses less electricity
Silent ∵ no moving parts
No need to defragment ∵ no moving parts
Small + compact
Disadvantages of solid state storage
Expensive
Less number of read/writes (because transistors break down, defragmentation = v. bad for SSDs)
Electrical charges leak away so data degrades faster
Virtual memory
Secondary storage is not volatile - can store OS and memory.
When RAM is full, a part of secondary storage is allocated to virtual memory, which functions as RAM. The CPU guesses which data isn't needed currently and puts it in virtual memory. If you then use that data, it takes time to load it into RAM and replace it with another piece of data. In this case, adding more RAM is beneficial.
Embedded System & examples
A computer system with a dedicated function, often part of a larger device. E.g.: insulin pump, burglar alarm, washing machine
The internet of things (IoT)
A network of physical objects that use embedded systems and wireless to collect and exchange data w/o human interaction. E.g., google home, thermostats, monitors & trackers
General-purpose computer
a computer that can run many different programs (e.g. a smartphone)
Disadvantages of embedded system
Lack flexibility
Harder to update software
Advantages of embedded system
More efficient at their task
Cheaper and smaller to build/design
Require less batteries & less processing power.
Embedded system's alternative to secondary storage
Embedded systems often don't use secondary storage - instructions needed to run them are stored in ROM (as firmware) and any user data is held in RAM.