Table of Contents

SPO600 - 2024 Fall

This is the SPO600 course schedule. It's a live document and will be revised as the course proceed. Each topic will be linked to notes at the end of this page as the course proceeds.

WeekWeek of …Class I (Tuesday - Syncronous on Zoom)Class II (Thursday - Asynchronous)Deliverables
Week 1September 2Introduction, Course Setup (incl SSH Keys)Binary Representation of Data, Introduction to Computer ArchitectureSetup Communication Tools
Week 2September 9Introduction to 6502 Assembly Language6502 Math and Flow ControlLab 1
Week 3September 166502 MathCompiler Internals and Compiler FlagsLab 2
Week 4September 236502 StringsCompiler OptimizationsLab 3
Week 5September 3064-Bit AssemblerSIMD, SVE, & SVE2Blog posts group 1
Week 6October 764-Bit Assembler LabIFunc, FMV, AFMVLab 4
Week 7October 14Building GCC, Initial Project DiscussionProject Stage 1 DetailsProject bogging
Reading WeekOctober 21Reading Week
Week 8October 28Project DiscussionProfilingProject Stage 1, Blog posts group 2
Week 9November 4Strategies for AFMV ParingPaged Memory ConceptsProject blogging
Week 10November 11Project DiscussionAdvanced Memory Concepts Project blogging
Week 11November 18Project DiscussionMemory Access in Multicore SystemsProject stage 2, Blog posts group 3
Week 12November 25Strategies for Landing AFMVProject RecommendationsProject blogging
Week 13December 2Project DiscussionProject RecommendationsProject blogging
Week 14December 9Course Wrap-UpNo classProject Stage 3, Blog posts group 4

Current Participants

See the SPO600 2024 Fall Participants page.

Week 1

Week 1 - Class I

Video

Note: these summary videos are no substitute for attending class in-person! It does not include: quizzes and quiz answer discussion, group exercises, and group discussion. It may take several days to process and edit the video before it is made available. It may not record properly and may not be made available. Do not rely only on the summary videos!

General Course Information

About SPO600 Classes

Introduction to the Problems

Porting and Portability
Optimization

Optimization is the process of evaluating different ways that software can be written or built and selecting the option(s) that has the best performance tradeoffs for the situation at hand.

Optimization may involve substituting software algorithms, altering the sequence of operations, using architecture-specific code, selecting data types, or altering the build process. It is important to ensure that the optimized software produces correct results and does not cause an unacceptable performance regression for other use-cases, system configurations, operating systems, or architectures.

The definition of “performance” varies according to the target system and the operating goals. For example, in some contexts, low memory or storage usage is important; in other cases, fast operation; and in other cases, low CPU utilization or long battery life may be the most important factor. It is often necessary to trade off performance in one area for another; using a lookup table, for example, can reduce CPU utilization and improve battery life in some algorithms, in return for increased memory consumption.

Virtually all compilers (and interpreters) perform some level of optimization, and the options selected for compilation can have a significant effect on the trade-offs made by the compiler, affecting memory usage, execution speed, executable size, power consumption, and debuggability.

However, there are some types of optimization that cannot be applied by the compiler, and which must be applied by the programmer.

Build Process

Building software is a complex task that many developers gloss over. The simple act of compiling a program invokes a process with five or more stages, including pre-processing, compiling, optimizing, assembling, and linking. However, a complex software system will have hundreds or even thousands of source files, as well as dozens or hundreds of build configuration options, auto configuration scripts (cmake, autotools), build scripts (such as Makefiles) to coordinate the process, test suites, and more.

The build process varies significantly between software packages. Most software distribution projects (including Linux distributions such as Ubuntu and Fedora) use a packaging system that further wraps the build process in a standardized script format, so that different software packages can be built using a consistent process.

In order to get consistent and comparable benchmark results, you need to ensure that the software is being built in a consistent way. Altering the build process is one way of optimizing software.

Note that the build time for a complex package can range up to hours or even days!

Benchmarking and Profiling

Benchmarking involves testing software performance under controlled conditions so that the performance can be compared to other software, the same software operating on other types of computers, or so that the impact of a change to the software can be gauged.

Profiling is the process of analyzing software performance on finer scale, determining resource usage per program part (typically per function/method). This can identify software bottlenecks and potential targets for optimization. The resource utilization studies may include memory, CPU cycles/time, or power.

Communication Tools Setup

Follow the instructions on the SPO600 Communication Tools page to set up a blog, create SSH keys, and send your blog URLs and public key to me.

I will use this information to:

  1. Update the Current SPO600 Participants page with your information, and
  2. Create an account for you on the SPO600 Servers, if you didn't do that during class.

The updating is done in batches every few days – allow some time!

Introduction to the 6502 Processor

The 6502 Processor is a simple 8-bit processor that powered a number of early microcomputers (and video games). We're going to use it to learn machine language and assembly language concepts before tackling modern processors (because the 6502 instruction set can be documented in one page rather than 7000 pages!).

Week 1 - Class II

Video

Due to a power + Internet outage, these videos are from a previous semester.

Week 1 Deliverables

* Set up your SPO600 Communication Tools

Week 2

Week 2 - Class I

Video

6502 Assembly Language Programming

Lab 1

Week 2 - Class II

Video

Resources

Week 2 Deliverables

Week 3

Week 3 - Class I

Video

Resources

Lab 2

Week 3 - Class II

Video

Resources

Week 3 Deliverables

Week 4

Week 4 - Class I

Video

Code

Lab 3

Week 4 - Class II

Video

Resources

Week 4 Deliverables

Week 5

Week 5 - Class I

Video

64-bit Class Servers

64-bit Assembly Language

Week 5 - Class II

Video

Week 5 Deliverables

Week 6

Week 6 - Class I

Video

64-bit Class Servers - Changes

Lab 4

Week 6 - Class II

Due to techical issues, the content for Week 6 - Class II will be covered in the October 15th class.

Week 6 Deliverables

Week 7

Week 7 - Class I

64-bit Class Servers - Changes

Video

How to Build GCC

Week 7 - Class II

Video

Course Project - Stage 1: Preparation

Week 7 Deliverables