📘 Chapter 6: External Memory – Simple Summary
6.1 Magnetic Disk
What it is: A disk with a magnetizable surface used to store data.
How it works: A read/write head writes magnetic signals as data; the disk spins to allow
data access.
Types: Fixed-head (old, rare) vs. movable-head (modern type).
Terms to remember:
o Platter: Circular disk.
o Track: A circle on the surface.
o Cylinder: Group of tracks on different platters.
o Sector: Subdivision of a track.
Performance: Measured using seek time, rotational latency, and data transfer rate.
6.2 RAID (Redundant Array of Independent Disks)
Purpose: Combines multiple disks to improve performance and/or data safety.
Key RAID Levels:
o RAID 0: Data split across disks (no backup); fast but no fault tolerance.
o RAID 1: Mirroring (duplicate data on two disks); safe but costly.
o RAID 2, 3: Use error-correcting codes and parity; rarely used.
o RAID 4: Parity stored on one disk; slower on writes.
o RAID 5: Parity spread across all disks; balanced performance.
o RAID 6: Two parity blocks; survives two disk failures.
6.3 Solid State Devices (SSDs)
What it is: Storage device with no moving parts (uses flash memory).
Pros:
o Very fast access.
o Resistant to shock.
o Smaller and lighter.
Cons:
o Limited write cycles.
o More expensive than HDDs.
Techniques to extend life:
o Wear leveling.
o TRIM command.
o Over-provisioning.
6.4 Optical Memory
Examples: CD, DVD, Blu-ray.
Working: Uses lasers to read/write data.
Types:
o CD-ROM: Read-only.
o CD-R: Can write once.
o CD-RW: Can write multiple times.
o DVD: Higher capacity than CDs.
o Blu-ray: High-definition, large storage.
Use: Best for media and archival storage.
6.5 Magnetic Tape
What it is: Long plastic tape coated with magnetic material.
Use: Cheapest for backups and archiving.
Features:
o Sequential access (slow for random access).
o Stored in cartridges.
o LTO (Linear Tape-Open): Current tape standard for large storage.
6.6 Error Correction
Purpose: Ensures data accuracy and can fix data errors.
Method: Commonly uses Hamming code.
Function:
o Detects and corrects single-bit errors.
o Adds parity or extra bits to detect mistakes.
o Used in memory systems, RAID arrays, and data storage.
🔑 Final Takeaways
Magnetic disks = Most common external memory.
RAID = Enhances performance and reliability.
SSDs = Faster and newer, but costlier.
Optical media = Reliable for read-only/archive.
Tapes = Best for backups due to low cost.
Error correction = Critical for data integrity.
📘 Chapter 7: Input / Output — Simplified Notes
7.1 External Devices
What are they? Devices outside the computer (like keyboard, printer, disk, modem).
Purpose: Allow the computer to communicate with the outside world.
Types:
o Human-readable: Monitors, keyboards, printers.
o Machine-readable: Sensors, disks, tape drives.
o Communication devices: Modems, network interfaces.
Each device connects to the system via an I/O module, which manages data exchange
and control.
7.2 I/O Module
Role: Acts like a bridge between the processor and external devices.
Why needed?
o Devices work at different speeds than CPU/memory.
o Devices use different data formats.
Main Functions:
o Control & timing: Coordinates the data transfer.
o Processor communication: Accepts commands and sends data/status.
o Device communication: Talks to the actual external device.
o Buffering: Temporarily stores data.
o Error detection: Checks for data errors during transfer.
7.3 Programmed I/O
What is it? CPU directly controls I/O.
How it works:
o CPU gives commands to I/O module.
o CPU waits for the device to be ready.
o CPU checks status, then reads/writes data.
Downside: Wastes CPU time — CPU does nothing else while waiting for device.
7.4 Interrupt-Driven I/O
Better than programmed I/O.
How it works:
o CPU tells the I/O module what to do.
o CPU then continues other work.
o I/O module sends an interrupt when ready.
o CPU temporarily pauses, handles the data, then goes back to previous task.
Advantage: More efficient — CPU isn’t stuck waiting all the time.
7.5 Direct Memory Access (DMA)
Best method for large data transfer.
What it does:
o A special DMA module moves data between memory and I/O device without
CPU help.
o CPU only sets up the transfer — DMA does the rest.
o Once done, DMA sends interrupt to CPU.
Benefit: CPU is free to do other tasks; faster for big data like file transfers or streaming.
🔑 Final Takeaways
Method CPU Involvement
Efficienc Best Use Case
y
Programmed I/O High (always busy) Low Simple, low-volume transfers
Interrupt-Driven Medium Better Occasional I/O; CPU multitasks
I/O
DMA Low Very High Large data blocks (e.g., disk ops)
📘 Chapter 14: Processor Structure and Function — Easy
Notes
14.1 Processor Organization
The processor (CPU) is the brain of the computer. It must:
1. Fetch instructions from memory.
2. Interpret them to know what to do.
3. Fetch data needed for execution.
4. Process data (like add or compare).
5. Write results back to memory or output.
To do all this, the processor needs:
o Temporary storage (like registers).
o Internal pathways to connect parts (called CPU interconnection).
14.2 Register Organization
Registers = small, fast storage units inside the CPU.
There are two types:
1. User-visible registers:
o Used by programmers for data and addresses.
o Types:
Data registers
Address registers
Condition codes (like zero, negative, overflow)
2. Control and status registers:
o Used internally by the CPU.
o Examples:
Program Counter (PC): holds address of next instruction.
Instruction Register (IR): holds the current instruction.
Memory Address Register (MAR): where to read/write in memory.
Memory Buffer Register (MBR): holds data to or from memory.
Registers help execute instructions quickly, avoiding slow memory access.
14.3 Instruction Cycle
This is the full process of running a single instruction.
Steps:
1. Fetch: Get the instruction from memory into the IR.
2. Decode: Understand the instruction.
3. Fetch operands: Get data needed (if any).
4. Execute: Perform the operation (like add, move, compare).
5. Store: Save the result back into memory or register.
6. Check for interrupt: Look for any external signals (like mouse/keyboard input).
Each instruction goes through this cycle. Some instructions may skip steps, but this is the basic
flow.
14.4 Instruction Pipelining
Pipelining: Like an assembly line in a factory — breaks instruction execution into steps
that run in parallel.
Speeds up the CPU by allowing multiple instructions to be in different stages at the same
time.
Typical stages:
1. FI – Fetch Instruction
2. DI – Decode Instruction
3. CO – Calculate Operands
4. FO – Fetch Operands
5. EI – Execute Instruction
6. WO – Write Operand
Benefits:
More instructions executed per second.
Efficient use of processor hardware.
Challenges:
Hazards like:
o Data hazards: waiting for results from previous instruction.
o Control hazards: due to branches and loops.
May need special handling like branch prediction.
✅ Final Quick Review Table
Topic Simple Explanation
Processor Org. The CPU fetches, decodes, executes, and stores.
Register Org. Fast memory inside CPU to hold data and instructions.
Instruction Cycle Series of steps every instruction follows to be executed.
Topic Simple Explanation
Instruction Pipelining Breaks execution into parts for speed, like an assembly line.
📘 Key Topics Simplified
🔸 Cache Memory
What it is: A small, very fast memory between CPU and main memory.
Purpose: Speeds up data access by storing frequently used data.
How it works: When CPU asks for data, it first checks the cache. If found (cache hit),
it’s super-fast. If not (cache miss), it gets data from slower main memory.
Levels:
o L1: Closest to CPU (smallest and fastest).
o L2: Bigger but slower than L1.
o L3: Even larger and shared among CPU cores.
🔸 ARM Processor
Type: RISC (Reduced Instruction Set Computer).
Why famous: Small, fast, and uses very little power.
Use: Phones, tablets, smartwatches, and embedded systems like car controls.
Design: ARM doesn’t make chips — it sells designs to others.
Special features:
o Uses registers for most operations.
o Instructions are small and fixed in size.
o Has fewer but faster instructions.
🔸 8086 Family (x86 Evolution)
8086: First Intel 16-bit processor, used in early IBM PCs.
80286: Added more memory access (up to 16 MB).
80386: First 32-bit CPU, supported multitasking.
80486: Had built-in math coprocessor + instruction pipelining.
Pentium series: Introduced superscalar execution (multiple instructions at once).
Core processors: Multi-core chips like Core i3, i5, i7.
🔸 PowerPC Evaluation
What is it? A processor architecture that started with IBM, Apple, and Motorola.
Design: Based on RISC principles.
Used in: Early Apple computers, some gaming consoles.
Features:
o Superscalar design (runs many instructions at once).
o Branch prediction and dynamic scheduling to boost performance.
🔸 RISC vs. CISC
Feature RISC CISC
Full form Reduced Instruction Set Complex Instruction Set
Instructions Few, simple, fast Many, complex, slower
Execution 1 instruction per clock cycle Takes more cycles
Example ARM, MIPS x86 (Intel processors)
Uses Phones, embedded systems PCs, laptops
Benefit Faster and easier to pipeline Smaller program size
RISC focuses on simplicity and speed, while CISC focuses on rich functionality.
🔸 Addressing Modes (How CPU finds data)
1. Immediate: Data is part of instruction (e.g., ADD A, 5)
2. Register: Data is in a register.
3. Direct: Data is at a memory location.
4. Indirect: Memory address is stored in a register.
5. Indexed: Address = base + index (good for arrays).
6. Relative: Address is near current instruction.
7. Based Indexed: Uses base + index + offset.
Each mode makes the CPU more flexible in accessing data in memory.
🔸 Registers (Types)
General Purpose Registers (GPRs): For holding data during operations.
Segment Registers: Used to divide memory in segments (used in 8086).
Index Registers: Help in loops and arrays.
Pointer Registers: Point to memory addresses (e.g., stack pointer).
🔸 Flag Registers (EFLAGS in x86)
Used to show the result of operations. Main flags:
CF (Carry Flag): Set if there’s a carry out.
ZF (Zero Flag): Set if result is 0.
SF (Sign Flag): Set if result is negative.
OF (Overflow Flag): Set on overflow.
PF (Parity Flag): Even number of 1s.
AF (Auxiliary Carry Flag): Used for binary-coded decimal.
IF (Interrupt Enable Flag): Enables/disables interrupts.
DF (Direction Flag): Direction for string operations.
TF (Trap Flag): Enables step-by-step debugging.