Skip to content
lectern.tv
MIT6.172Systems & CSundergraduate· 2018

Performance Engineering of Software Systems

Prof. Charles Leiserson & Julian Shun

Systematic engineering of fast software: Bentley optimization rules, bit hacks, compiler vectorization, Cilk work-span parallelism, cache-oblivious algorithms, memory allocators, and lock-free synchronization.

Start Lecture 121 lectures · 27h total
Syllabus progress0 of 21 watched
MIT 6.172: Performance Engineering of Software Systems

Syllabus

21
Lecture 1· 1:00:20

1. Introduction and Matrix Multiplication

This inaugural lecture for MIT's 6.172 course introduces performance engineering principles through an examination of code optimization, specifically contrasting matrix multiplication implementations in Python, Java, and C.

Lecture 2· 1:20:10

2. Bentley Rules for Optimizing Work

This lecture presents Bentley's Rules for optimizing software performance, covering techniques such as loop unrolling, short-circuiting, fast paths, and compile-time initialization, illustrated with practical code examples.

Lecture 3· 1:18:54

3. Bit Hacks

This lecture, part of MIT's Performance Engineering course, analyzes various bit manipulation techniques and compiler optimizations, demonstrating how to achieve maximal efficiency for critical code segments.

Lecture 4· 1:17:34

4. Assembly Language & Computer Architecture

This lecture delineates the entire software-to-hardware execution pipeline, from high-level source code through compilation to machine code, and its interpretation by the underlying computer architecture, including the instruction set. Professor Leiserson elaborates on the interactions between compilers and processor design.

Lecture 5· 1:21:30

5. C to Assembly

This lecture details the compilation process from C source code to x86-64 assembly, analyzing the intermediate representation of LLVM IR and its translation to machine instructions. Key mapping principles between high-level language constructs and low-level hardware operations are demonstrated.

Lecture 6· 1:16:46

6. Multicore Programming

This lecture examines modern multicore processor architectures and the necessity of parallel programming for high performance. It details the Cilk runtime system, covering its abstraction of processor cores, synchronization primitives, communication protocols, and provably efficient load balancing mechanisms.

Lecture 7· 1:14:39

7. Races and Parallelism

This lecture explores the fundamental concepts of races and parallelism in concurrent systems, detailing how cilkscale can be used for determinacy race detection and discussing various types of schedulers for parallel execution.

Lecture 8· 1:17:34

8. Analysis of Multithreaded Algorithms

This lecture systematically develops methods for analyzing the performance of multithreaded algorithms, specifically addressing divide-and-conquer recurrences in the context of Cilk loops, parallel matrix multiplication, and merge sort.

Lecture 9· 1:18:46

Lecture 9: What Compilers Can and Cannot Do (6.172)

This lecture dissects the Clang/LLVM compilation pipeline, investigating compiler optimizations, diagnostic reports, and case studies in performance failures. It examines how compilers transform code and their limitations.

Lecture 10· 1:21:28

Lecture 10: Measurement and Timing (6.172)

This session addresses the crucial aspects of reliably measuring software performance, exploring various timing mechanisms and the common pitfalls leading to inaccurate measurements. The use of simulators for performance evaluation is also covered.

Lecture 11· 1:05:26

Lecture 11: Storage Allocation (6.172)

This lecture covers diverse storage allocation techniques, including stacks, fixed-size, and variable-size heaps. It further elucidates garbage collection strategies such as reference counting, mark-and-sweep, and stop-and-copy.

Lecture 12· 1:17:21

Lecture 12: Parallel Storage Allocation (6.172)

This lecture differentiates between malloc() and mmap(), introduces cactus stacks, and explores parallel allocation strategies including global/local heaps and local ownership. It concludes with an examination of incremental, parallel, and concurrent garbage collection.

Lecture 13· 1:21:47

Lecture 13: The Cilk Runtime System (6.172)

This session centers on the Cilk runtime system, emphasizing the 'work-first principle' to optimize serial execution even at the cost of additional computation during steals. Performance models and parallel runtime systems are also highlighted.

Lecture 14· 1:18:23

Lecture 14: Caching and Cache-Efficient Algorithms (6.172)

This lecture explores cache associativity and the ideal cache model, detailing cache-aware techniques such as tiled matrix multiplication and cache-oblivious strategies like divide-and-conquer matrix multiplication for performance optimization.

Lecture 15· 1:21:47

Lecture 15: Cache-Oblivious Algorithms (6.172)

This lecture illustrates cache-oblivious algorithms through simulations of heat diffusion and 3-point stencil. It also examines the interaction between caching and parallelism within the Cilk framework.

Lecture 16· 1:22:12

Lecture 16: Nondeterministic Parallel Programming (6.172)

This lecture examines nondeterministic parallel programming, focusing on atomicity implemented via mutexes, determinacy races, and data races. It also addresses deadlock scenarios, including the classic dining philosophers' problem.

Lecture 17· 1:20:10

Lecture 17: Synchronization Without Locks (6.172)

This lecture explores non-lock synchronization methods, utilizing memory models, Peterson's algorithm, and instruction reordering. It covers the compare-and-swap operation, lock-free stacks, and the ABA problem.

Lecture 18· 1:11:22

Lecture 18: Domain Specific Languages and Autotuning (6.172)

This lecture explores domain-specific languages (DSLs), their applicability, scheduling optimizations, and autotuning techniques. GraphIt, Halide, and OpenTuner are discussed as examples of effective DSLs.

Lecture 19· 1:23:03

Lecture 20: Speculative Parallelism & Leiserchess (6.172)

This lecture investigates speculative parallelism and its applications in parallel alpha-beta search and jamboree search. It concludes with a comprehensive discussion of high-performance computer chess programs.

Lecture 20· 1:20:53

Lecture 21: Tuning a TSP Algorithm (6.172)

This lecture, part of MIT's Performance Engineering course, delves into practical strategies for tuning and optimizing algorithms for the Traveling Salesperson Problem. It covers recursive enumeration, algorithm engineering, and effective application of data structures to achieve high performance.

Lecture 21· 1:18:40

Lecture 22: Graph Optimization (6.172)

This lecture explores graph optimizations, both algorithmic and locality-based, addressing challenges such as large, sparse, and irregular real-world graphs. It highlights issues with memory access and the context-specific effectiveness of optimizations.