Course / 10
Computer Architecture and Operating Systems
How a computer runs a program, from the bits of a number to a process talking over the network: RISC-V assembly, the memory hierarchy, the processor and its parallelism, then the operating system and system programming in C.
Before you start: programming in any language. No hardware background is assumed, and C is introduced in the course. The architecture half uses RISC-V assembly, which runs in the RARS simulator; the operating-system half uses C on Linux, and most of its examples also run on macOS. Notes marked Extension are branches the rest of the course does not need.
- 01
Foundations
What a computer system is, and how numbers live in bits.
After this section: Read and write integers in binary and hexadecimal, predict overflow and byte order, and explain why 0.1 + 0.2 is not 0.3.
3 of 3 notes published - 02
RISC-V Assembly
The instruction set as the contract between hardware and software, and programs written in it.
After this section: Write, encode and trace RISC-V programs with branches, loops, arrays and recursive procedures that follow the calling convention.
4 of 4 notes published - 03
Memory Hierarchy
Why memory looks fast and private to every program.
After this section: Simulate a cache, compute the average access time, translate a virtual address through a page table and a TLB.
2 of 2 notes published - 04
Inside the Processor
How the hardware executes instructions, and how it is interrupted.
After this section: Trace an instruction through a pipelined datapath, find hazards, and follow a trap from the device to its handler and back.
3 of 3 notes published - 05
Parallelism and Performance
Doing more per cycle, per core and per instruction, and measuring whether it helped.
After this section: Tell instruction-, thread- and data-level parallelism apart, apply Amdahl's law, and speed up a loop by fixing its memory access.
5 of 5 notes published - 06
The Operating System
The kernel, the C programs that call it, and how a program becomes a running image.
After this section: Write C that manages memory explicitly, make system calls, and explain what the linker and loader do to an executable.
5 of 5 notes published - 07
Processes and Concurrency
Programs that run at the same time, and how they cooperate safely.
After this section: Create processes and threads, find a race condition and fix it, and choose a channel for processes to communicate.
3 of 3 notes published - 08
Files, Users and Isolation
Persistent data, who may touch it, and machines inside machines.
After this section: Work with file descriptors and permissions, and explain what a virtual machine and a container each isolate.
3 of 3 notes published - 09
Networking
How bytes travel between machines, and the API a program uses to send them.
After this section: Follow a packet through the protocol layers and write a TCP client and server with sockets.
2 of 2 notes published - 10
Languages and Compilers
What lies between source code and the machine: runtimes and compilers.
After this section: Explain what a language runtime asks of the operating system, and follow a C function through the stages of a compiler.
2 of 2 notes published