Computer Architecture

The design of computer systems β€” covering processors, memory hierarchies, instruction sets, pipelining, parallelism, and I/O systems.

Introduction to Computer Architecture

Introduction to Computer Architecture is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Fundamentals of Computer Architecture

Fundamentals of Computer Architecture is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Core Concepts in Computer Architecture

Core Concepts in Computer Architecture is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Foundations of Computer Architecture

Foundations of Computer Architecture is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Essential Principles

Essential Principles is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Key Theories and Models

Key Theories and Models is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Practical Applications

Practical Applications is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Problem-Solving Methods

Problem-Solving Methods is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Advanced Topics

Advanced Topics is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Case Studies and Examples

Case Studies and Examples is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Core principles, practical applications, and advanced concepts that build deep understanding.

Research Methods

Research Methods is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Time complexity (Big-O), space complexity, correctness proof, and practical implementation trade-offs.

Current Trends and Developments

Current Trends and Developments is a core technology topic with practical implementations, complexity analysis, and real-world applications.

Key points: Syntax and semantics, best practices, debugging techniques, and project-based application.

Key Formulas & Equations

CPU Time: CPU Time = Instruction Count Γ— CPI Γ— Clock Cycle Time
Amdahl's Law: Speedup = 1 / [(1 βˆ’ P) + P/S]
P = parallelizable fraction, S = number of processors
Little's Law: N = Ξ» Γ— W
N = average number in system, Ξ» = arrival rate, W = average time in system
Cache Hit Rate: Effective Access Time = Hit Time + Miss Rate Γ— Miss Penalty
CPI: CPI = Ξ£ (CPIi Γ— Instruction Frequencyi)
Memory Hierarchy: Storage = Registers β†’ L1 Cache β†’ L2 Cache β†’ L3 Cache β†’ RAM β†’ SSD β†’ HDD
Bandwidth: BW = Data Transferred / Time
Power (Dynamic): P = C Γ— VΒ² Γ— f
C = capacitance, V = voltage, f = frequency. Halving voltage reduces power to ΒΌ.

Core Concepts

1. Von Neumann Architecture
The stored-program concept: instructions and data share the same memory. Components: ALU, control unit, memory, input/output. The fetch-decode-execute cycle: read instruction β†’ interpret β†’ perform β†’ store result.
2. Instruction Set Architecture (ISA)
The contract between hardware and software. RISC (Reduced Instruction Set Computer): simple instructions, fixed length, load-store architecture. CISC (Complex Instruction Set Computer): variable-length instructions, complex addressing modes.
3. Pipelining
Overlapping execution of multiple instructions β€” like an assembly line. Stages: Fetch, Decode, Execute, Memory, Writeback. Hazards: structural (resource conflict), data (dependency), control (branches). Techniques: forwarding, branch prediction, out-of-order execution.
4. Memory Hierarchy
Multiple levels of storage balancing speed, cost, and size. Locality of reference: temporal (recently accessed likely again) and spatial (nearby data likely needed). Caches exploit both to bridge the processor-memory speed gap.
5. Parallelism
ILP (Instruction-Level): pipelining, superscalar, VLIW. TLP (Thread-Level): multi-core, SMT (Hyper-Threading). DLP (Data-Level): SIMD (SSE, AVX). MLP (Memory-Level): prefetching, multiple memory channels.

Core Definitions

CPI (Cycles Per Instruction): The average number of clock cycles each instruction takes to execute. CPU Time = Instructions Γ— CPI Γ— Cycle Time. Goal: minimize CPI.
MIPS: Millions of Instructions Per Second = Clock Rate / (CPI Γ— 10⁢). A performance metric that doesn't account for instruction complexity differences.
Branch Prediction: The technique of guessing whether a branch will be taken before it's resolved, allowing the pipeline to speculatively fetch instructions. Modern predictors achieve >95% accuracy.
SIMD: Single Instruction, Multiple Data β€” one instruction operates on multiple data elements simultaneously. Used in graphics, signal processing, and machine learning (SSE, AVX, NEON).

Worked Examples

Example 1: CPU Time Calculation
Program: 1 billion instructions, CPI = 1.5, clock rate = 3 GHz.
CPU Time = 10⁹ Γ— 1.5 Γ— (1/3Γ—10⁹) = 0.5 seconds
Example 2: Amdahl's Law
90% of a program can be parallelized using 10 processors:
Speedup = 1 / [(1βˆ’0.9) + 0.9/10] = 1 / (0.1 + 0.09) = 1/0.19 = 5.26Γ—
Example 3: Cache Performance
Hit time = 2 cycles, miss rate = 5%, miss penalty = 100 cycles:
EAT = 2 + 0.05 Γ— 100 = 2 + 5 = 7 cycles

Practice Problems

Problem 1: A 2 GHz processor has CPI = 2.5. How many instructions per second can it execute?
Answer: Instructions/sec = Clock Rate / CPI = 2Γ—10⁹ / 2.5 = 800 MIPS
Problem 2: What is the maximum speedup with infinite processors if 70% of a program is parallelizable?
Answer: Speedup = 1/(1βˆ’0.7) = 1/0.3 = 3.33Γ— maximum
Problem 3: A cache has hit time 3 cycles, miss rate 10%, miss penalty 50 cycles. Calculate effective access time.
Answer: EAT = 3 + 0.10 Γ— 50 = 3 + 5 = 8 cycles
Problem 4: If voltage is reduced from 1.0V to 0.7V and frequency stays the same, by what factor does dynamic power decrease?
Answer: (0.7)Β² / (1.0)Β² = 0.49/1.0 = 51% reduction (power scales with VΒ²)
Problem 5: What is the difference between RISC and CISC architectures?
Answer: RISC: simple fixed-length instructions, load-store, many registers, compiler-optimized. CISC: complex variable-length instructions, memory-to-memory operations, fewer registers, hardware-optimized.

πŸ“š Related Subjects