H446/01 · Computer SystemsSection 1.1

1.1.2 Types of processor

CISC and RISC characteristics, GPUs, parallel systems (SISD, SIMD, MISD, MIMD)

📚1.1.2 Types of Processor

1.1.2(a) RISC and CISC Processors

RISC (Reduced Instruction Set Computers)

Definition
RISC processors utilise a small, highly optimised set of instructions. Each instruction is designed to be executed within a single clock cycle, resulting in efficient, predictable performance.

assembly
// 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

Key Point
Key Characteristics of RISC:
• 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)

Definition
CISC processors have a larger and more complex set of instructions, some of which can perform multi-step operations in a single command. This design reduces the number of instructions required for a task but increases the complexity of each instruction.

assembly
// Multiplying two numbers in CISC:
MULT A, B   ; Multiply the values of A and B
            ; One instruction does what takes four in RISC

Key Point
Key Characteristics of CISC:
• 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

Key Point
Instruction Set:
• 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

Exam Tip
Exam Focus: Be prepared to compare RISC and CISC architectures. Key points: instruction complexity vs quantity, compiler vs hardware emphasis, pipelining efficiency.


1.1.2(b) Graphics Processing Units (GPUs)

Definition
A GPU is designed with a large number of independent processors that work in parallel, making it exceptionally effective for tasks that require the same operation to be repeated on large sets of data.

Key Point
Key Characteristics of 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

Example
GPU Applications:
• 3D graphics rendering for gaming
• Machine learning and neural network training
• Scientific simulations
• Cryptocurrency mining
• Video encoding/decoding

SIMD Architecture

Definition
Single Instruction Multiple Data (SIMD) - An architecture where one instruction is applied to multiple data points simultaneously. This is ideal for tasks like image processing where the same operation needs to be performed on every pixel.

Exam Tip
Why GPUs excel at graphics/ML: The parallel nature of these tasks (same operation on many pixels/data points) matches the GPU's SIMD architecture perfectly. A CPU would process pixels one by one; a GPU processes hundreds simultaneously.


1.1.2(c) Multicore and Parallel Systems

Multicore Systems

Definition
A multicore processor contains multiple processing units (cores) on a single chip, each capable of executing its own set of instructions independently. This design allows for parallel processing where different cores work on separate tasks simultaneously.

Key Point
Key Characteristics of 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

Definition
Parallel processing is the simultaneous execution of multiple instructions or processes. It can occur within a multicore CPU (task parallelism) or across multiple processors.

Pros & Cons
Pros & Cons:

AdvantagesDisadvantages
Faster execution of suitable tasksNot all tasks can be parallelised
Better multitasking performanceSoftware must be specially written
Improved throughput for parallel workloadsIncreased complexity and debugging difficulty
Power efficiency (multiple slower cores vs one fast core)Diminishing returns as cores increase

Key Point
When multicore doesn't help:
• 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

Worked Example
Worked Example: Image Processing

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.

Exam Tip
Choosing the right processor:
• 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