1.1.2 Types of Processor
1.1.2(a) RISC and CISC Processors
RISC (Reduced Instruction Set Computers)
// Multiplying two numbers in RISC:
LDA R1, X ; Load the value of X into register R1
LDA R2, Y ; Load the value of Y into register R2
MULT R1, R2 ; Multiply the values in R1 and R2
STO R1, X ; Store the result back in X
• Simple instruction set, each executing in a single clock cycle
• Emphasis on software to perform complex tasks
• Pipelining is straightforward as each instruction is uniform in execution time
• Compiler must perform more work, translating high-level code into numerous simple instructions
• Requires more RAM to store longer sets of instructions
CISC (Complex Instruction Set Computers)
// Multiplying two numbers in CISC:
MULT A, B ; Multiply the values of A and B
; One instruction does what takes four in RISC
• Larger instruction set with more complex commands
• Emphasis on reducing the number of instructions per program
• Individual instructions may take multiple clock cycles
• Compiler's job is easier with fewer instructions needed
• Requires less RAM because instructions are shorter and more complex
• Many specialised instructions, though some may remain unused
RISC vs CISC Comparison
• RISC: Small, simple instructions
• CISC: Large, complex instructions
Clock Cycles:
• RISC: 1 per instruction
• CISC: Multiple per complex instruction
Compiler Work:
• RISC: More work required
• CISC: Less work required
RAM Usage:
• RISC: More RAM needed
• CISC: Less RAM needed
Pipelining:
• RISC: Straightforward
• CISC: More complex
Emphasis:
• RISC: Software complexity
• CISC: Hardware complexity
1.1.2(b) Graphics Processing Units (GPUs)
• Composed of thousands of smaller, simpler cores that can handle many operations simultaneously
• Optimised for tasks involving parallel processing (image rendering, video processing, deep learning)
• Act as co-processors, working alongside the CPU to offload specific workloads
• Use SIMD (Single Instruction Multiple Data) architecture
• 3D graphics rendering for gaming
• Machine learning and neural network training
• Scientific simulations
• Cryptocurrency mining
• Video encoding/decoding
SIMD Architecture
1.1.2(c) Multicore and Parallel Systems
Multicore Systems
• Multiple cores allow for parallel execution of instructions
• Significantly improves performance in tasks designed for parallelism
• Beneficial in large projects that can divide work across cores
• Software must be optimised to fully utilise all available cores
• Not all tasks can be parallelised (some are inherently sequential)
Parallel Processing
| Advantages | Disadvantages |
|---|---|
| Faster execution of suitable tasks | Not all tasks can be parallelised |
| Better multitasking performance | Software must be specially written |
| Improved throughput for parallel workloads | Increased complexity and debugging difficulty |
| Power efficiency (multiple slower cores vs one fast core) | Diminishing returns as cores increase |
• Sequential tasks (must wait for previous step)
• Poorly written software (not optimised for multiple cores)
• Tasks with heavy data dependencies
• Overhead from coordinating multiple cores exceeds benefits
A photo editing application needs to apply a filter to a 4000x3000 pixel image.
Single Core:
• Processes pixels one by one
• Time = 12 million operations sequentially
Quad Core:
• Divides image into 4 sections (1000x3000 each)
• Each core processes 3 million pixels simultaneously
• Theoretical time = 1/4 of single core (ignoring overhead)
GPU with 1000 cores:
• Processes 1000 pixels simultaneously
• Massive parallelism suits this task perfectly
• Much faster than even multicore CPU for this specific task
Key Point: The right processor depends on the task. GPUs excel at parallel data processing, multicore CPUs handle multitasking, and single-core performance still matters for sequential tasks.
• Gaming/Graphics → GPU for rendering, CPU for game logic
• Video editing → GPU for effects, multicore CPU for encoding
• Scientific simulations → Depends on parallelisability
• Everyday tasks → Balanced multicore CPU sufficient