Week 1Introduction to OS Architecture & Kernel Concepts
### 🖥️ 核心知识点:操作系统架构与内核概念 本周介绍课程使用的操作系统平台(OpenBSD)和开发环境(C 语言)。理解 monolithic kernel vs microkernel 架构的核心区别。 - **核心概念**: OS architecture taxonomy (monolithic, microkernel, hybrid), kernel space vs user space, system calls, OpenBSD overview, C programming for systems (pointers, memory layout), development environment setup (SSH, make, gdb) ⏰ **本周节奏**: 难度 ⭐⭐⭐ | 预计投入 10h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 3h + 环境搭建 2h) 🎯 **考试关联**: Exam 会考 kernel 架构对比和 system call 机制 🧪 **Lab**: 搭建 OpenBSD 开发环境,编译运行第一个 kernel module,熟悉 make 和 gdb 📌 **作业关联**: Assignment 1(kernel programming)从 Week 3 开始,本周打基础 ⚠️ **易错点**: OpenBSD 与 Linux 有细微但关键的差异(头文件路径、系统调用命名);C 指针错误在 kernel 中会导致 panic (数据来源:2025 S2 Course Profile)
OS architecture taxonomy (monolithicmicrokernelhybrid)kernel space vs user spacesystem calls
💡 学习提示
• 请详细解释 COMP3301 中 "Introduction to OS Architecture & Kernel Concepts" 的核心概念
• Introduction to OS Architecture & Kernel Concepts 的常见考题有哪些?
• Introduction to OS Architecture & Kernel Concepts 有哪些实际应用?
Week 2Process Management & Scheduling
### 🔄 核心知识点:进程管理与调度 本周学习进程(Process)的生命周期和 CPU 调度算法。这是 OS 最核心的抽象之一。 - **核心概念**: Process vs Thread, process states (new/ready/running/waiting/terminated), PCB (Process Control Block), context switch overhead, scheduling algorithms (FCFS, SJF, Round Robin, Priority, MLFQ), OpenBSD scheduler ⏰ **本周节奏**: 难度 ⭐⭐⭐ | 预计投入 10h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 3h + 编程 2h) 🎯 **考试关联**: 调度算法的对比(turnaround time, response time, fairness)是必考大题 🧪 **Lab**: 在 OpenBSD 上用 fork/exec/wait 创建进程树,用 ps 和 top 观察调度行为 📌 **作业关联**: Assignment 1 可能涉及进程管理相关的 kernel 修改 ⚠️ **易错点**: fork() 返回值在 parent 和 child 中不同;忘记 wait() 导致 zombie processes (数据来源:2025 S2 Course Profile)
Process vs Threadprocess states (new/ready/running/waiting/terminated)PCB (Process Control Block)context switch overheadscheduling algorithms (FCFS
💡 学习提示
• 请详细解释 COMP3301 中 "Process Management & Scheduling" 的核心概念
• Process Management & Scheduling 的常见考题有哪些?
• Process Management & Scheduling 有哪些实际应用?
Week 3Memory Management & Virtual Memory
### 🧠 核心知识点:内存管理与虚拟内存 本周深入 OS 最复杂的子系统之一 — 内存管理。虚拟内存让每个进程以为自己独占全部内存。 - **核心概念**: Virtual address space, page tables (single/multi-level), TLB (Translation Lookaside Buffer), page faults, page replacement algorithms (FIFO, LRU, Clock), demand paging, memory-mapped files, OpenBSD pmap ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐ | 预计投入 11h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 4h + Assignment 1 启动 2h)🔥 高压周 🎯 **考试关联**: 地址转换(virtual → physical)手动计算是 Exam 必考题;page replacement trace 也常考 🧪 **Lab**: 实现简单的 page replacement 模拟器,比较 FIFO/LRU/Clock 的 page fault 率 📌 **作业关联**: Assignment 1 发布 — kernel 级编程任务 ⚠️ **易错点**: 多级页表的地址位分割容易算错;TLB miss ≠ page fault(TLB miss 后查页表可能命中) (数据来源:2025 S2 Course Profile)
Virtual address spacepage tables (single/multi-level)TLB (Translation Lookaside Buffer)page faultspage replacement algorithms (FIFO
💡 学习提示
• 请详细解释 COMP3301 中 "Memory Management & Virtual Memory" 的核心概念
• Memory Management & Virtual Memory 的常见考题有哪些?
• Memory Management & Virtual Memory 有哪些实际应用?
Week 4Concurrency & Synchronization
### 🔒 核心知识点:并发与同步 本周学习多线程并发编程中最关键的问题 — 同步。Race condition 是最难调试的 bug 类型之一。 - **核心概念**: Race conditions, critical sections, mutex locks, semaphores, condition variables, monitors, deadlock (必要条件, prevention, avoidance, detection), producer-consumer problem, readers-writers problem, pthread API ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐⭐ | 预计投入 12h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 4h + Assignment 1 3h)🔥 课程难度巅峰之一 🎯 **考试关联**: Deadlock 的四个必要条件和同步原语的使用是 Exam 高频考点 🧪 **Lab**: 用 pthread mutex/semaphore 实现 producer-consumer;制造并修复一个 race condition 📌 **作业关联**: Assignment 1 可能需要处理 kernel 中的并发问题 ⚠️ **易错点**: 忘记释放 mutex 导致 deadlock;semaphore 初始值设错;signal 和 wait 顺序反了 (数据来源:2025 S2 Course Profile)
Race conditionscritical sectionsmutex lockssemaphorescondition variables
💡 学习提示
• 请详细解释 COMP3301 中 "Concurrency & Synchronization" 的核心概念
• Concurrency & Synchronization 的常见考题有哪些?
• Concurrency & Synchronization 有哪些实际应用?
Week 5Device Drivers & I/O Subsystem
### 💾 核心知识点:设备驱动与 I/O 子系统 本周学习 OS 如何与硬件设备通信。设备驱动开发是这门课的特色 — 直接在 kernel 中写代码控制硬件。 - **核心概念**: I/O hardware (ports, buses, controllers), device driver architecture, character vs block devices, interrupt handling (top-half/bottom-half), DMA (Direct Memory Access), OpenBSD device driver framework, ioctl ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐⭐ | 预计投入 12h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 4h + Assignment 1 冲刺 3h)🔥 高压周 🎯 **考试关联**: Interrupt 处理流程和设备驱动架构是 Exam 常考内容 🧪 **Lab**: 编写一个简单的 character device driver(OpenBSD),实现 open/close/read/write 📌 **作业关联**: Assignment 1 截止临近 — 可能涉及设备驱动实现 ⚠️ **易错点**: Kernel 中不能用标准库(no printf, no malloc — 用 kernel 等价物);interrupt handler 中不能 sleep (数据来源:2025 S2 Course Profile)
I/O hardware (portsbusescontrollers)device driver architecturecharacter vs block devices
💡 学习提示
• 请详细解释 COMP3301 中 "Device Drivers & I/O Subsystem" 的核心概念
• Device Drivers & I/O Subsystem 的常见考题有哪些?
• Device Drivers & I/O Subsystem 有哪些实际应用?
Week 6File Systems Design & Implementation
### 📁 核心知识点:文件系统设计与实现 本周学习文件系统 — OS 如何将磁盘上的物理块组织成用户看到的文件和目录结构。 - **核心概念**: File system interface (open/read/write/close), directory structures, inode-based file systems (UFS/FFS), block allocation (contiguous, linked, indexed), free space management, journaling concepts, VFS (Virtual File System) layer ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐ | 预计投入 11h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 4h + Assignment 2 准备 2h) 🎯 **考试关联**: Inode 结构和 block allocation 策略是 Exam 必考内容 🧪 **Lab**: 分析 OpenBSD FFS 文件系统结构,用 stat/debugfs 查看 inode 信息 📌 **作业关联**: Assignment 2 发布 — 可能涉及文件系统相关的 kernel 修改 ⚠️ **易错点**: 间接块(indirect block)的层级计算容易出错;inode 中的 block 指针数和文件最大大小的关系 (数据来源:2025 S2 Course Profile)
File system interface (open/read/write/close)directory structuresinode-based file systems (UFS/FFS)block allocation (contiguouslinked
💡 学习提示
• 请详细解释 COMP3301 中 "File Systems Design & Implementation" 的核心概念
• File Systems Design & Implementation 的常见考题有哪些?
• File Systems Design & Implementation 有哪些实际应用?
Week 7Networking Stack & Socket Programming
### 🌐 核心知识点:网络协议栈与 Socket 编程 本周学习 OS 中的网络子系统。从 TCP/IP 协议栈在 kernel 中的实现到用户空间的 socket API。 - **核心概念**: OSI/TCP-IP layer model in kernel, socket API (socket/bind/listen/accept/connect), TCP vs UDP, network buffer management (mbuf in BSD), kernel network stack path (packet reception → protocol processing → user delivery) ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐ | 预计投入 11h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 3h + Assignment 2 3h) 🎯 **考试关联**: TCP 连接建立和 kernel 网络路径是 Exam 考点 🧪 **Lab**: 用 C socket API 实现 client-server 程序;用 tcpdump 在 OpenBSD 上抓包分析 📌 **作业关联**: Assignment 2 进行中 ⚠️ **易错点**: 忘记处理 byte order(htonl/ntohs);accept() 阻塞导致单线程服务器只能服务一个客户端 (数据来源:2025 S2 Course Profile)
OSI/TCP-IP layer model in kernelsocket API (socket/bind/listen/accept/connect)TCP vs UDPnetwork buffer management (mbuf in BSD)kernel network stack path (packet reception → protocol processing → user delivery)
💡 学习提示
• 请详细解释 COMP3301 中 "Networking Stack & Socket Programming" 的核心概念
• Networking Stack & Socket Programming 的常见考题有哪些?
• Networking Stack & Socket Programming 有哪些实际应用?
Week 8Security & Protection Mechanisms
### 🔐 核心知识点:安全与保护机制 本周学习 OS 如何实现安全防护。从访问控制到 privilege escalation 攻击,理解安全是 OS 设计的基本考量。 - **核心概念**: Access control (DAC, MAC), file permissions (UNIX rwx), capabilities, privilege rings, ASLR (Address Space Layout Randomization), stack canaries, OpenBSD security features (pledge, unveil, W^X) ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐ | 预计投入 11h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 3h + Assignment 2 3h) 🎯 **考试关联**: 访问控制模型和 OpenBSD 安全特性是 Exam 考点 🧪 **Lab**: 使用 pledge() 和 unveil() 限制进程权限;分析一个简单的 buffer overflow 示例 📌 **作业关联**: Assignment 2 冲刺 ⚠️ **易错点**: setuid 程序的安全风险容易被忽视;ASLR 不是万能的(信息泄露可以绕过) (数据来源:2025 S2 Course Profile)
Access control (DACMAC)file permissions (UNIX rwx)capabilitiesprivilege rings
💡 学习提示
• 请详细解释 COMP3301 中 "Security & Protection Mechanisms" 的核心概念
• Security & Protection Mechanisms 的常见考题有哪些?
• Security & Protection Mechanisms 有哪些实际应用?
Week 9Distributed Systems Fundamentals
### 🌍 核心知识点:分布式系统基础 本周从单机 OS 扩展到分布式系统。学习多台机器如何协同工作的基本原理。 - **核心概念**: Distributed system models, RPC (Remote Procedure Call), network file systems (NFS), distributed naming, consistency models (strict, sequential, eventual), CAP theorem, clock synchronization (Lamport timestamps) ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐ | 预计投入 11h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 3h + Assignment 2 提交 3h)🔥 Assignment 2 Due 🎯 **考试关联**: CAP theorem 和 consistency models 是 Exam 常考概念题 🧪 **Lab**: 用 RPC 实现简单的分布式服务;配置 NFS 挂载 📌 **作业关联**: Assignment 2 截止 ⚠️ **易错点**: CAP 定理中 P(分区容忍)不是可选的 — 网络总会出问题;eventual consistency 不代表 "最终一定一致" (数据来源:2025 S2 Course Profile)
Distributed system modelsRPC (Remote Procedure Call)network file systems (NFS)distributed namingconsistency models (strict
💡 学习提示
• 请详细解释 COMP3301 中 "Distributed Systems Fundamentals" 的核心概念
• Distributed Systems Fundamentals 的常见考题有哪些?
• Distributed Systems Fundamentals 有哪些实际应用?
Week 10Real-Time Operating Systems
### ⏱️ 核心知识点:实时操作系统 本周学习实时计算 — 对时间有严格约束的系统(航空、医疗、工业控制)。实时 OS 的调度策略与通用 OS 截然不同。 - **核心概念**: Hard real-time vs soft real-time, rate monotonic scheduling, earliest deadline first (EDF), priority inversion (Mars Pathfinder case), priority inheritance protocol, RTOS examples (FreeRTOS, VxWorks), QNX microkernel ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐ | 预计投入 10h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 3h + Assignment 3 启动 2h) 🎯 **考试关联**: 实时调度算法(RMS, EDF)的可调度性分析是 Exam 考点 🧪 **Lab**: 用 EDF 算法模拟实时任务调度,验证是否满足所有 deadline 📌 **作业关联**: Assignment 3 发布 ⚠️ **易错点**: Priority inversion 可以让高优先级任务饿死(Mars Pathfinder 真实案例);RMS 的 CPU 利用率上界 ≈ 69%,不是 100% (数据来源:2025 S2 Course Profile)
Hard real-time vs soft real-timerate monotonic schedulingearliest deadline first (EDF)priority inversion (Mars Pathfinder case)priority inheritance protocol
💡 学习提示
• 请详细解释 COMP3301 中 "Real-Time Operating Systems" 的核心概念
• Real-Time Operating Systems 的常见考题有哪些?
• Real-Time Operating Systems 有哪些实际应用?
Week 11OS Design Case Studies
### 📚 核心知识点:操作系统设计案例分析 本周对比不同 OS 的设计哲学和权衡。从商业 OS 到开源项目,理解 "没有最好的设计,只有最合适的权衡"。 - **核心概念**: Linux kernel architecture, Windows NT kernel, macOS/XNU hybrid kernel, OpenBSD security-first design philosophy, software ownership models (GPL, BSD, proprietary), kernel module vs monolithic compilation ⏰ **本周节奏**: 难度 ⭐⭐⭐ | 预计投入 10h(Lecture 2h + Tutorial 1h + Lab 2h + 自学 3h + Assignment 3 2h) 🎯 **考试关联**: OS 设计对比和 software ownership models 是 Exam 常考概念题 🧪 **Lab**: 对比 Linux 和 OpenBSD 的同一功能实现(如进程创建),分析设计差异 📌 **作业关联**: Assignment 3 进行中 ⚠️ **易错点**: GPL vs BSD license 的核心区别(GPL 要求衍生作品也开源,BSD 不要求);不要混淆 microkernel 和 modular monolithic (数据来源:2025 S2 Course Profile)
Linux kernel architectureWindows NT kernelmacOS/XNU hybrid kernelOpenBSD security-first design philosophysoftware ownership models (GPL
💡 学习提示
• 请详细解释 COMP3301 中 "OS Design Case Studies" 的核心概念
• OS Design Case Studies 的常见考题有哪些?
• OS Design Case Studies 有哪些实际应用?
Week 12Virtualization, Containers & Review
### ☁️ 核心知识点:虚拟化、容器与课程回顾 最后一周覆盖现代 OS 的前沿话题 — 虚拟化和容器化,以及全课程回顾。 - **核心概念**: Hypervisor (Type-1: bare-metal, Type-2: hosted), hardware virtualization (VT-x), paravirtualization, containers (namespaces, cgroups), Docker vs VM overhead comparison, unikernels, comprehensive review ⏰ **本周节奏**: 难度 ⭐⭐⭐⭐ | 预计投入 12h(Lecture 2h + Tutorial 1h + Lab 2h + Assignment 3 提交 3h + 复习 4h)🔥 Assignment 3 Due + 备考 🎯 **考试关联**: Exam 覆盖全部 12 周。虚拟化 vs 容器的对比是常考题。重点复习:调度算法、虚拟内存、同步原语、文件系统、安全机制 🧪 **Lab**: 体验 OpenBSD vmm/vmd 虚拟化;Assignment 3 最终调试 📌 **作业关联**: Assignment 3 截止 — 这是最后一个编程作业 ⚠️ **易错点**: VM 有完整 OS 开销,container 共享 host kernel;Docker 不是虚拟机;考试时间管理很重要 (数据来源:2025 S2 Course Profile)
Hypervisor (Type-1: bare-metalType-2: hosted)hardware virtualization (VT-x)paravirtualizationcontainers (namespaces
💡 学习提示
• 请详细解释 COMP3301 中 "Virtualization, Containers & Review" 的核心概念
• Virtualization, Containers & Review 的常见考题有哪些?
• Virtualization, Containers & Review 有哪些实际应用?