Docsity

Chapter_12_Computer_Architecture_and_Hardware, Lecture notes of Computer Fundamentals

Toggle sidebar
bg1
CH APTE R 12
Computer Architecture & Hardware
Applied Computing Study Notes • CPU Execution, Memory Hierarchy & Parallelism
1. Von Neumann Model & Fetch-Decode-Execute Cycle
Modern general-purpose computers store both program instructions and working data in the same main memory system ( Stored-
Program Concept ). The CPU executes instructions through a continuous hardware loop:
Fetch: The Program Counter (PC) sends the next instruction address to memory; the instruction loads into the Instruction
Register (IR).
Decode: The Control Unit (CU) interprets the opcode and identifies required source registers or memory operands.
Execute: The Arithmetic Logic Unit (ALU) performs math/logic operations or computes branch targets, writing results back to
registers.
2. The Memory Hierarchy
Fast memory is expensive per byte and physically small, whereas large storage is much slower. Hardware bridges this gap using
Locality of Reference —programs repeatedly access recently used addresses (temporal locality) and nearby addresses (spatial
locality).
Figure 12.1: Speed vs. Capacity Trade-off Across Storage Tiers
3. Instruction Pipelining & Architectural Paradigms
Pipelining overlaps multiple instructions at different stages (similar to an assembly line), boosting instruction throughput even
though a single instruction's total latency stays unchanged.
Architecture Style Design Philosophy Typical Use Case
RISC (e.g., ARM) Fixed-length simple instructions; load/store memory access;
highly energy efficient.
Smartphones, laptops, embedded controllers, cloud
servers.
CISC (e.g.,
x86-64)
Variable-length rich instructions that combine memory access
and arithmetic.
Desktop workstations, legacy enterprise servers,
high-clock gaming PCs.
GPU (SIMD/
SIMT)
Thousands of lightweight cores executing the same instruction
across huge data arrays.
3D graphics rendering, matrix multiplication, neural
network training.
1.
2.
3.
CPU Registers (~1 ns)
L1 / L2 / L3 SRAM Cache (2–15 ns)
Main DRAM Memory (50–100 ns)
NVMe SSD & Magnetic Storage (10 µs – 10 ms)
pf2

Partial preview of the text

Download Chapter_12_Computer_Architecture_and_Hardware and more Lecture notes Computer Fundamentals in PDF only on Docsity!

CHAPTER 12

Computer Architecture & Hardware

Applied Computing Study Notes • CPU Execution, Memory Hierarchy & Parallelism

1. Von Neumann Model & Fetch-Decode-Execute Cycle

Modern general-purpose computers store both program instructions and working data in the same main memory system ( Stored- Program Concept ). The CPU executes instructions through a continuous hardware loop:

Fetch: The Program Counter (PC) sends the next instruction address to memory; the instruction loads into the Instruction Register (IR ). Decode: The Control Unit (CU) interprets the opcode and identifies required source registers or memory operands. Execute: The Arithmetic Logic Unit (ALU) performs math/logic operations or computes branch targets, writing results back to registers.

2. The Memory Hierarchy

Fast memory is expensive per byte and physically small, whereas large storage is much slower. Hardware bridges this gap using Locality of Reference —programs repeatedly access recently used addresses (temporal locality) and nearby addresses (spatial locality).

Figure 12.1: Speed vs. Capacity Trade-off Across Storage Tiers

3. Instruction Pipelining & Architectural Paradigms

Pipelining overlaps multiple instructions at different stages (similar to an assembly line), boosting instruction throughput even though a single instruction's total latency stays unchanged.

Architecture Style Design Philosophy Typical Use Case RISC (e.g., ARM) Fixed-length simple instructions; load/store memory access; highly energy efficient.

Smartphones, laptops, embedded controllers, cloud servers. CISC (e.g., x86-64)

Variable-length rich instructions that combine memory access and arithmetic.

Desktop workstations, legacy enterprise servers, high-clock gaming PCs. GPU (SIMD/ SIMT)

Thousands of lightweight cores executing the same instruction across huge data arrays.

3D graphics rendering, matrix multiplication, neural network training.

CPU Registers (~1 ns) L1 / L2 / L3 SRAM Cache (2–15 ns) Main DRAM Memory (50–100 ns) NVMe SSD & Magnetic Storage (10 μs – 10 ms)

Quick Memory Tip: Cache Hit Ratio Effective memory access time depends heavily on avoiding Cache Misses. Writing cache-friendly software—such as iterating sequentially through contiguous arrays instead of jumping across scattered pointers—can make code run 5x–10x faster on identical hardware.