

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CHAPTER 12
Applied Computing Study Notes • CPU Execution, Memory Hierarchy & Parallelism
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.
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
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.