Course covers operating systems and systems programming with a focus on Linux and Unix-based systems. Followed by ECE454 — Computer Systems Programming.
Concepts covered
Core concepts
- Process
- Process control blocks
- Process states (blocking, zombie, orphan)
- Inter-process communication
- Kernel
- Syscall
read
andwrite
(operating on file descriptors)exit
andexit_group
(exit statuses)opendir
andclosedir
(opening and closing directories)fork
(spawning processes)execve
andexeclp
(replacing processes with other programs)wait
andwaitpid
(cleaning up child processes)sleep
(time blocking)pipe
(creates a bidirectional pipe)dup
anddup2
(duplicating file descriptors)mmap
(file to virtual memory mapping)open
(opens file)lseek
(advances position in file descriptor by offset)flush
andsync
(flushes a buffer, possibly a filesystem buffer)
- Linux
- Syscall
- Virtual memory
- Segmentation
- Page table (page faults, computations)
- Memory management unit
- Translation lookaside buffer
- Page replacement
- Optimal, random, FIFO
- Least recently used
- Clock replacement
- Scheduler
- Thread and multithreading
- pthread
pthread_create
(create thread)pthread_join
(join on thread, equivalent of process wait)pthread_exit
(exit thread)pthread_detach
(mark thread as detached)
- Threading libraries (many-to-one, one-to-one, many-to-many)
- Thread pool
- ucontext
- Race condition
- Atomics
- Mutex (deadlock)
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_unlock
- Condition variable (monitor)
pthread_cond_init
pthread_cond_destroy
pthread_cond_signal
pthread_cond_broadcast
pthread_cond_wait
- Semaphore
sem_init
sem_destroy
sem_wait
sem_trywait
sem_post
- pthread
- Secondary storage
- Solid-state drive (SSD)
- RAID
- Filesystem
- Linux filesystem
- Filesystem allocation
- Linked allocation
- File allocation table (FAT)
- Indexed allocation
- inode
- Memory allocation (and memory fragmentation)
- alloca (compile-time stack allocation)
- Dynamic memory allocation (runtime heap allocation)
- Buddy allocator
- Slab allocator
- Virtual machine
Extra concepts
- Instruction set architecture (amd64, aarch64, rv64gc)
- Application binary interface (ABIs)
- x86-64 ABI
- .elf (executable files)
- Library
- Static/dynamic libraries
- Semantic versioning
- Intermediate representation
- Data structure
- Concurrent hash tables
- queue.h (
TAILQ
)
Tools
- Windows Subsystem for Linux
- Docker
- Meson
- Linux utilities
strace
(syscalls)ldd
(dynamic libraries)- Valgrind (dynamic memory allocation)
man
(documentation manuals)htop
(processes)
Extra notes
To compile with Meson:
Quick links: