Course Overview & Running Example
What this OS & Computer Architecture course covers, how to use it, prerequisites, and the running example used throughout.
Track: Computer Science → OS & Computer Architecture Platform: Linux x86-64 (examples verified on Ubuntu 22.04, kernel 6.18 under WSL2, GCC 11.2) plus ARM64 and RISC-V for architecture comparisons
Levels: Beginner → Intermediate → Advanced → Expert Audience: Students, programmers who want to know what really happens below their code, embedded and systems engineers, and interview candidates
Course Overview
Every program you write runs on two machines at once: the operating system, which gives it the illusion of owning a whole computer, and the hardware, which actually executes its instructions. This course follows your code all the way down:
how bits, logic gates and an ALU implement arithmetic;
how a CPU fetches, decodes and executes instructions, and how instruction set architectures (x86-64, ARM, RISC-V) differ;
how a program becomes a process, and how a system call crosses from your code into the kernel;
how the OS schedules threads, synchronizes them and avoids deadlock;
how caches, virtual memory, file systems and I/O devices work;
how pipelines, branch prediction, out-of-order execution and multicore caches make modern CPUs fast — and how they occasionally surprise you.
How This Course Is Organized The course has 4 stages and 35 modules. Every module follows the same structure:
The explanation, split into sub-topics Why It Matters Where the topic shows up in real software and interviews The key commands, APIs or notation
Runnable programs and command transcripts The real output of those examples Misconceptions and bugs to avoid How professionals apply the topic What interviewers ask Exercises to try yourself
Multiple-choice, true/false, predict-the-output and find-the-bug questions with answers A small problem with a worked solution A Note on Verified Output
Every C program, Python simulation and shell transcript in this course was actually run on Linux (Ubuntu 22.04 on WSL2, x86-64, Intel Core i5-8300H: 4 cores / 8 threads, 32 KB L1d per core, 256 KB L2 per core, 8 MB shared L3) and the output shown is exactly what it printed. ARM64 and RISC-V assembly listings were produced by a real cross-compiler (Clang via Zig). Output that depends on the machine — timings, addresses, process IDs, cache sizes — will differ on yours; such lines are pointed out where they occur. To run the examples yourself, use any Linux machine, WSL on Windows, or a Linux virtual machine, and compile with gcc -O2 -Wall file.c -o prog -lpthread.
Learning Objectives
By the end of this course you will be able to:
Explain the layers between source code and silicon, and what each layer adds.
Represent integers and floating-point numbers in binary and predict overflow, sign extension and endianness effects.
Build adders, multiplexers and registers from logic gates, and describe a CPU's datapath and control unit.
Compare ISAs (CISC vs RISC; x86-64, ARM64, RISC-V) and read basic assembly and calling conventions.
Describe how a program is compiled, linked, loaded and turned into a process.
Use process APIs (fork, exec, wait), threads and IPC, and explain what a system call does at the CPU level.
Compare CPU scheduling algorithms and compute waiting and turnaround times.
Write correct synchronized code and detect, prevent or avoid deadlock.
Explain caches, virtual memory, paging, TLBs and page replacement, and measure their effects.
Explain how file systems, storage devices and I/O (interrupts, DMA) work.
Explain pipelining, hazards, branch prediction, superscalar and out-of-order execution, cache coherence and memory ordering.
Understand virtualization, containers, booting and hardware security features, and analyse system performance.
Answer OS and computer architecture interview questions with confidence.
Prerequisites
Basic programming in C (variables, functions, pointers, arrays). The EngiLipi C course covers everything needed.
Comfort with a command line.
A Linux environment for running the examples (native, WSL or a VM) with gcc, objdump, readelf and strace installed (sudo apt install build-essential strace binutils).
The Course Running Example
One tiny operation recurs throughout the course: printing a line of text. Following printf("speed = %d km/h\n", speed) from the C source down to the hardware touches almost every topic:
Module 1 shows every layer of this path at once, the modules in between explain each layer in depth, and Module 30 traces the complete journey of a single write() system call from your code down to silicon.
flowchart TB
SRC["C source: printf(...)"] --> LIB["C library: formats text, calls write()"]
LIB --> SYS["System call: syscall instruction, switch to kernel mode"]
SYS --> KER["Kernel: file descriptor, terminal / pipe / file driver"]
KER --> MEM["Memory: virtual addresses, page tables, caches"]
MEM --> CPU["CPU: fetch, decode, execute, pipeline"]
CPU --> HW["Hardware: logic gates, transistors"]