A Tour of Computer Systems
Explore the fundamental architecture of computer systems, understanding the relationship between information, hardware, and programs. Includes a classic Hello World compilation process demonstration.
View Notes Source CodeComputer Systems: A Programmer's Perspective
// Understanding Computer Systems from a Programmer's Viewpoint
Explore the fundamental architecture of computer systems, understanding the relationship between information, hardware, and programs. Includes a classic Hello World compilation process demonstration.
View Notes Source CodeMaster bit-level operations and integer representations: two's complement encoding, signed/unsigned conversions, arithmetic operations with overflow handling, sign extension, and practical bit manipulation techniques including shift operations and Boolean algebra applied to bit vectors.
View Notes Source CodeExplore floating-point number representation and normalized/denormalized numbers. Learn about rounding modes, floating-point arithmetic (addition/multiplication), and practical C programming with floating-point numbers.
View Notes Source CodeDive into x86-64 assembly programming fundamentals: understand the compilation process from C to machine code, explore programmer-visible state (registers, program counter, memory), master data movement instructions, addressing modes, and arithmetic/logical operations including the powerful leaq instruction for optimization.
View Notes Source CodeMaster advanced control flow in x86-64 assembly: condition codes (CF, ZF, SF, OF), conditional branches with setX and jX instructions, and conditional moves for branch prediction optimization. Learn loop implementations (do-while, while, for) and switch statements using jump tables for efficient multi-way branching.
View Notes Source CodeMaster procedure calls and stack frames in x86-64 assembly. Learn ABI (Application Binary Interface) specifications, stack structure and operations (push/pop), calling conventions for control and data transfer. Understand register conventions (caller-saved vs callee-saved), stack frame management, and how recursion is implemented using the stack mechanism.
View Notes Source CodeExplore advanced data structures in assembly: arrays (1D, nested, multi-level, and variable-length), structs with alignment requirements, linked lists, and unions. Understand memory layout principles, buffer overflow vulnerabilities, and floating-point representation in x86-64 assembly.
View Notes Source CodeMaster program optimization techniques from multiple levels: code motion (loop invariant code motion), reduction in strength, and sharing common subexpressions. Understand optimization blockers like procedure calls and memory aliasing. Explore instruction-level parallelism through modern CPU superscalar processors, pipelining, loop unrolling, parallel accumulation, and branch prediction strategies.
View Notes Source CodeDeep dive into memory hierarchy: storage technologies (SRAM/DRAM/SSD/Disk), locality principles (temporal & spatial), cache organization, and performance optimization through code restructuring to improve cache utilization and program efficiency.
View Notes Source CodeMaster exceptional control flow mechanisms: exceptions (traps, faults, aborts, interrupts), process creation and management using fork, wait, and execve system calls. Understand process control flow, context switching, concurrent execution, zombie and orphan processes, and process graphs for modeling multi-process program behavior.
View Notes Source CodeManipulate bits using bitwise operations and implement functions following strict coding rules. Learn about two's complement, floating-point representation, and bit-level operations.
View LabDefuse a "binary bomb" by understanding assembly language and using a debugger. Learn about stack frames, registers, and machine-level programming.
View LabUnderstand and exploit buffer overflow vulnerabilities. Learn about code injection attacks, ROP (Return-Oriented Programming), and system security.
View LabBuild a cache simulator and optimize matrix transpose for cache performance. Deep dive into memory hierarchy, cache organization, and performance optimization.
View LabBuild your own Unix shell (tsh) by implementing process control, signal handling, and job control. Learn about exceptional control flow, process creation, and Unix system calls.
View LabImplement your own dynamic memory allocator (malloc/free). Understand virtual memory, heap management, allocation strategies, and memory optimization techniques.
View LabBuild a concurrent web proxy server handling HTTP requests. Learn about network programming, socket API, concurrency, and web protocol implementation.
View Lab