Operating Systems
Processes, threads, scheduling, memory management and file systems: kernel structure and system calls, process creation with fork, exec, pipes and signals, POSIX threads and concurrency models, CPU scheduling from FCFS to Linux CFS and real-time policies, race conditions, locks and atomics, semaphores, condition variables and monitors, deadlock prevention, avoidance and detection, paging, virtual memory and page replacement, storage devices and the file system interface, file system implementation with journaling and RAID, ending in a capstone on virtual machines, containers and tracing a program end to end.
CMPUT-379 Year 3 3 credits 12 lessons · 6 h 44 min
Offered by HSM University · Computing Science
What you'll learn
- Explain how an operating system provides abstraction, protection and resource management using dual-mode execution, interrupts and system calls, and observe system calls with strace.
- Create, manage and connect processes with fork, exec, wait, pipes and signals, and describe process states and the process control block.
- Write multithreaded programs with POSIX threads, compare threading and concurrency models, and estimate speed-up with Amdahl's law.
- Simulate and compare CPU scheduling algorithms, including FCFS, SJF, SRTF, round robin, MLFQ, Linux CFS and real-time rate-monotonic scheduling.
- Identify race conditions and data races, detect them with ThreadSanitizer, and fix them with mutexes, spinlocks and atomic operations.
- Solve synchronization problems such as bounded buffers, readers-writers and barriers using semaphores, condition variables and monitors.
- Characterize deadlock with the four Coffman conditions and resource-allocation graphs, and prevent, avoid or detect it, including the banker's algorithm.
- Translate virtual addresses through single-level and multilevel page tables, explain the TLB, and compare paging with segmentation.
- Analyse demand paging, page-replacement algorithms, working sets, thrashing and kernel memory allocators, and measure page faults.
- Compare hard disks and SSDs, schedule disk requests, and use the POSIX file interface, links, permissions and fsync correctly.
- Explain file system implementation with inodes, extents and directories, crash consistency with journaling and copy-on-write, and RAID reliability.
- Trace a program end to end through the kernel, and compare virtual machines and containers built from hypervisors, namespaces and cgroups.
Course content
12 lessons · 6 h 44 min total · final exam
- 1 What an operating system does 32 min · quiz
- 2 Processes 33 min · quiz
- 3 Threads and concurrency models 32 min · quiz
- 4 CPU scheduling 32 min · quiz
- 5 Synchronization I: race conditions, locks and atomic operations 34 min · quiz
- 6 Synchronization II: semaphores, condition variables, monitors and classic problems 33 min · quiz
- 7 Deadlock 34 min · quiz
- 8 Memory management I: address spaces, paging and segmentation 33 min · quiz
- 9 Memory management II: virtual memory, page replacement and allocation 34 min · quiz
- 10 Storage and file systems I: devices, scheduling and the file system interface 35 min · quiz
- 11 File systems II: implementation, journaling, RAID and reliability 38 min · quiz
- 12 Capstone: virtualization, containers and the operating system end to end 34 min · quiz
- E Final exam 20 questions
Requirements
Recommended background. You can start any course at any time.
Description
Processes, threads, scheduling, memory management and file systems: kernel structure and system calls, process creation with fork, exec, pipes and signals, POSIX threads and concurrency models, CPU scheduling from FCFS to Linux CFS and real-time policies, race conditions, locks and atomics, semaphores, condition variables and monitors, deadlock prevention, avoidance and detection, paging, virtual memory and page replacement, storage devices and the file system interface, file system implementation with journaling and RAID, ending in a capstone on virtual machines, containers and tracing a program end to end.
Part of the Science stream, typically taken in year 3.