Computer Architecture and Organization

Computer Architecture

Computer Architecture

High-Yield Revision Hub

Master Computer Architecture

Master Pipelining, Cache Memory Mapping, RISC vs CISC, Instruction Hazards, and Memory Hierarchy.

Concept Breakdown

Detailed technical explanation

Computer Architecture Core Concept Breakdown

  1. Instruction Pipelining: Pipelining increases CPU instruction throughput by overlapping instruction execution stages (Fetch, Decode, Execute, Memory, Writeback).

    • Non-Pipelined Time: T_n = n * k * \tau
    • Pipelined Time: T_p = (k + n - 1) * \tau
    • Ideal Speedup (S): S_k = (n * k) / (k + n - 1) -> k as n -> infinity
  2. Cache Memory & Address Structure:

    • Direct Mapping Address: | Tag | Line / Index | Word / Offset |
    • Set Associative Address: | Tag | Set Index | Word / Offset |
    • Fully Associative Address: | Tag | Word / Offset |
  3. Cache Replacement Policies & Write Policies:

    • Write-Through: Every write operation updates both cache and main memory.
    • Write-Back: Writes occur only in cache; main memory is updated when a dirty block is evicted.

Key Revision Rules

Essential formulas and core points to memorize

  • 1Pipelined Time Formula: Execution time for n instructions on a k-stage pipeline is T = (k + n - 1) * ClockCycleTime.
  • 2Pipelining Speedup Ratio: S = (n * k) / (k + n - 1). As n -> ∞, Speedup approaches k (the number of stages).
  • 3Cache Memory Placement: Direct Mapping (1 slot per block), Set Associative (N slots per set), Fully Associative (Any slot).
  • 4Pipeline Hazards: Structural (Hardware collision), Data (RAW/WAR/WAW dependencies), Control (Branch instructions).
  • 5RISC vs CISC: RISC relies on Hardwired Control and Load-Store architecture; CISC relies on Microprogrammed Control and variable instruction formats.

Common Exam Mistakes

Where students frequently lose marks

Confusing Pipelined execution time formula for 1 instruction vs n instructions: For 1 instruction it takes k cycles; for n instructions it takes k + n - 1 cycles.
Confusing Write-Through (updates main memory immediately) with Write-Back (uses dirty bit, updates memory on eviction).
Assuming RISC has microprogrammed control: RISC uses hardwired control for single-cycle execution.

Topic Quiz Practice

1 of 5
Question 1

[CoA Quiz Q1/10] In a 5-stage instruction pipeline, executing 100 instructions without hazards takes how many clock cycles assuming non-pipelined execution takes 5 cycles per instruction?