Address Space and Memory Model
Virtual address width, page granularity, alignment and the ordering contract that lets x86-64, ARM64 and RISC-V programs agree on what a shared memory write means.
Virtual address width, page granularity, alignment and the ordering contract that lets x86-64, ARM64 and RISC-V programs agree on what a shared memory write means.
How an effective address is computed from base, index, scale, displacement and PC, and why the same array access costs a different number of address calculations on x86-64, ARM64 and RISC-V.
Three bounds that answer different questions: how far parallel speedup can go, how much concurrency a latency needs, and whether compute or bandwidth is the ceiling.
The five layers from technology to system, the three walls that ended scaling, and the numbers every later page inherits.
Preprocess, compile, assemble, link: the four stages, the directives and relocations each leaves behind, and how to read them back from ELF objects.
Read-modify-write instructions and ordering instructions: how C11 memory orders map onto lock prefixes, LDAXR/STLXR, LR/SC and the fences each ISA requires.
How a read-modify-write grabs a cache line exclusively, why LL/SC fails spuriously, and when a queue lock or futex beats a spinning test-and-set.
Three kinds of evidence for a performance claim: standard workloads, cycle-level models, and the on-chip counters that explain where the time went.
Bit and byte conventions, byte order, alignment and padding, and the object layout rules that decide what a binary format looks like.
How direction and target predictors, BHT, BTB, TAGE, and the return-address stack keep the front end fed.
How a program changes its control flow: flags versus compare-and-branch, PC-relative encodings, and the range limits of x86-64, AArch64 and RISC-V.
The single-writer invariant, MESI and MOESI state machines, and why snooping gives way to directories as core counts grow.
The tag-index-offset split, direct-mapped versus set-associative lookup, line size and index translation, and the numbers that decide hit rate and hit time.
From gates to state: multiplexers, adders and decoders, then latches, flip-flops, setup and hold, and the clocking rules that make state reliable.
The two-way promise between a compiler and an instruction set: instruction semantics, ABI, alignment, memory model, undefined behaviour and target features.
Die cost from area, yield and wafer price, the NRE that volume must amortize, and why Dennard scaling no longer funds the next node.
The ALU, register file, shifter, multiplier and divider, their delay and area cost, and how they share one clocked path.
How the DRAM interface evolved from one 64-bit channel to DDR5 subchannels, stacked HBM, persistent DIMMs and CXL memory, and what each costs in latency and bandwidth.
How an out-of-order core uses scoreboards, reservation stations, and the wakeup-select loop to hide latency while preserving dataflow semantics.
Synchronous faults and asynchronous interrupts as one control-transfer mechanism: vector tables, privilege switch and the cost of handling an event.
How faults become errors and errors become failures, what SECDED and chipkill can and cannot correct, and how availability follows from MTBF and MTTR.
Moore and Mealy structure, state encoding, and the next-state timing path that sets a controller clock period.
IEEE 754 fields, rounding, special values and the non-associativity that breaks naive comparisons, reductions and parallelism.
Superseded by the Hardware domain; kept while its content moves into the new pages.
Two ways to turn opcodes into control signals: direct combinational decode and a microprogram in a control store, with the latency, area and patchability each buys.
The RTL-to-bitstream flow, what synthesis infers, and the timing and resource numbers a field-programmable device really delivers.
How performance and efficiency cores share one ISA and one coherent domain, what differs inside them, and why the scheduler rather than the silicon decides whether the mix pays off.
The capacity-latency ladder from registers to disk, the AMAT identity that prices it, and how locality turns a hundred-nanosecond miss into a one-nanosecond average.
How opcodes, register numbers and immediates share a fixed word: the six RISC-V formats, x86-64 variable-length encoding, and the decode and code-size limits each choice buys.
Two’s complement ranges, the three overflow semantics, and the Q-format arithmetic that replaces floats in DSP and embedded code.
How physical addresses are striped across channels, banks and ranks, why stride and granularity decide the achieved bandwidth, and how to measure the gap to the theoretical peak.
The ISA as the binary contract between software and silicon: what it fixes, what it leaves to the microarchitecture, and how compatibility survives across generations.
RISC and CISC as consequences of two choices, operand location and encoding width, with the real instruction counts, code sizes and decode limits of x86-64, ARM64 and RISC-V.
Choosing an instruction set on ecosystem, energy, extensions and supply rather than on clock speed: x86-64, AArch64, RISC-V and the migration cost.
The Boolean layer: truth tables, canonical forms, CMOS gates, and the delay, fan-out and power limits that pass upward.
How unrolling, software pipelining, tiling, and interchange expose ILP and locality, and when dependence analysis forbids them.
What SC, TSO and the weak models allow, how store buffers make write-read reordering the default, and how acquire and release pin it back down.
The three-factor performance equation, how CPI decomposes into stalls, and which metric answers which question.
The three Cs plus coherence, non-blocking caches and MSHRs, hardware and software prefetch, and cache blocking as the software answer to a working set that will not fit.
Splitting one instruction across several clock cycles: intermediate registers, a step sequencer, variable CPI, and the area-for-time trade.
How several cores share LLC slices, a ring or mesh fabric, memory controllers and I/O inside one socket, and how that topology sets the latency and bandwidth a parallel program actually sees.
Private L1 and L2 behind a shared L3: what inclusive, exclusive and non-inclusive caches cost in effective capacity, snoop filtering and back-invalidation traffic.
Nodes, distance matrices and first-touch allocation: why a remote page costs 1.5 to 2 times a local one and how to bind CPU and memory together.
Fault classes and their costs, the kernel path that fills a missing PTE, and why the working set rather than RSS decides whether memory is enough.
The virtual-address split, the four- or five-level radix tree that maps it, and the PTE bits that carry protection, presence and dirty state.
Overlapping instruction stages: the five-stage schedule, the clock period set by the slowest stage, and the speedup formula that governs every later page.
Structural, data and control hazards, the forwarding and stall rules that resolve them, and the in-order commit a precise exception requires.
Dynamic and leakage power, the RAPL counters that measure them, and the thermal path that decides when a chip must slow down.
Privilege levels as a capability label and virtualization as one more layer under them: rings, exception levels, sensitive instructions and stage-2 translation.
The binary contract behind a call: argument registers, callee-saved state, stack alignment and frame layout in System V AMD64, AAPCS64 and RISC-V.
How register renaming removes false dependencies and the reorder buffer restores precise state at commit.
Architectural registers across x86-64, ARM64 and RISC-V, the four operand kinds an instruction can encode, and why constant materialisation and calling conventions follow from register width.
How a set chooses the line to evict and how a write reaches the next level: LRU and its approximations, write-back versus write-through, and the traffic each choice costs.
How one physical core interleaves several thread contexts to fill idle issue slots, which state is replicated, which resources stay shared, and why SMT buys throughput instead of latency.
One instruction per clock cycle: the shared combinational path, the load-limited clock period, and why a CPI of one still loses on frequency.
How a core executes past unresolved branches and memory dependencies without exposing speculative state, and why Spectre broke that contract.
The two cells behind every level of the hierarchy: a 6T latch that holds a bit and a 1T1C capacitor that leaks one, with the density, timing and refresh contracts each imposes.
Issue width, parallel pipelines and the dependency limits that turn a four-wide machine into an IPC of two or three.
How a small translation cache turns a four-level walk into one lookup, why its reach matters more than its hit rate, and what a shootdown really costs.
What sits around the cores inside a socket: LLC slices, the ring or mesh, home agents, memory controllers, the I/O complex and the power unit that binds their clocks.
Root and non-root CPU modes, two-dimensional paging with EPT or NPT, and the exit and nested-walk costs that set a guest apart from bare metal.
How VLIW and EPIC bundles move scheduling into the compiler, and what that trades away in compatibility and code size.