1
课程详述
COURSE SPECIFICATION
以下课程信息可能根据实际授课需要或在课程检讨之后产生变动。如对课程有任何疑问,请联
系授课教师。
The course information as follows may be subject to change, either during the session because of unforeseen
circumstances, or following review of the course at the end of the session. Queries about the course should be
directed to the course instructor.
1.
课程名称 Course Title
计算机操作系统 Operating Systems
2.
授课院系
Originating Department
计算机科学与工程系 Department of Computer Science and Technology
3.
课程编号
Course Code
CS302
4.
课程学分 Credit Value
3
5.
课程类别
Course Type
专业核心课 Major Core Courses
6.
授课学期
Semester
春季 Spring
7.
授课语言
Teaching Language
英文 English
8.
他授课教师)
Instructor(s), Affiliation&
Contact
For team teaching, please list
all instructors
唐博,助理教授,计算机科学与工程系,tangb3@sustech.edu.cn
Bo Tang, Assistant Professor, Department of Computer Science and Engineering,
tangb3@sustech.edu.cn
9.
/
方式
Tutor/TA(s), Contact
沈昀,教学实验员,计算机科学与工程系, sheny@mail.sustech.edu.cn
Yun Shen, Teaching laboratory technician, Department of Computer Science and
Engineering, sheny@mail.sustech.edu.cn
10.
选课人数限额(不填)
Maximum Enrolment
Optional
授课方式
Delivery Method
习题/辅导/讨论
Tutorials
实验/实习
Lab/Practical
其它(请具体注明)
OtherPlease specify
总学时
Total
11.
学时数
Credit Hours
32
64
2
12.
先修课程、其它学习要求
Pre-requisites or Other
Academic Requirements
CS102A 计算机程序设计基础 A Introduction to Computer Programming A
CS203 数据结构与算法分析 Data Structures and Algorithm Analysis
CS202 计算机组成原理 Computer Organization Principle
13.
后续课程、其它学习规划
Courses for which this course
is a pre-requisite
14.
其它要求修读本课程的学系
Cross-listing Dept.
教学大纲及教学日历 SYLLABUS
15.
教学目标 Course Objectives
作系本概理。首先个基作系:线程、和双
护。除此之外,学生们还将主要学习有关进程管理、内存管理、I/O 和文件系统的知识。此外,本课程将让学生们有机会通
过完成一系列项目来构建操作系统原型,这是一个让他们充分了解进程调度、内存管理和文件系统的好机会。
This course firstly introduces the basic concepts and principles of operating system. First, four fundamental OS concepts:
Thread, Process, Address Space with Translation and Dual Mode Operation will be introduced. Second, we will study
three major topics in Operating system: process management, memory management, I/O and file system respectively.
Finally, this course will give students chances on build an OS prototype by completing three projects, which is a good
opportunity to make them fully understand process scheduling, memory management and file systems.
16.
预达学习成果 Learning Outcomes
完成本课程后,学生应能够掌握如下技能:
熟悉进程的概念:内核和用户空间、信号、任务调度、同步。
熟悉内存管理:地址转换、缓存、分页。
熟悉 IO、存储和文件系统。
通过完成实验课练习和一系列项目,提高编码能力。
On completion of this course, the student should be able to:
Familiarize with process concepts: kernel and user space, signal, schedule, synchronization.
Familiarize with memory management: address translation, caching, paging.
Familiarize with IO, storage and file system.
Improve the coding ability by finishing the lab exercises and three course projects.
17.
课程内容及教学日历 (如授课语言以英文为主,则课程内容介绍可以用英文;如团队教学或模块教学,教学日历须注明
主讲人)
Course Contents (in Parts/Chapters/Sections/Weeks. Please notify name of instructor for course section(s), if
this is a team teaching or module course.)
3
Week 1. Course Information and OS Introduction
o Introduce the prerequisite, syllabus and assessment
o What is an OS?
o What does an OS do?
o OS basics
o What is a process?
o What is a shell?
o What is a system call?
o OS components
[Lab 1] Introduction to Basic Shell Commands and Fundamental C Programming.
Week 2. Fundamental OS Concepts
o Computer organization revision
o Kernel data structures in OS
o OS history
o Four fundamental OS concepts: Thread, Address space, Process and Dual model.
[Lab 2] Introduction to Shell and Shell Programming
Week 3. Process: from User Space
o What is a process?
o Process: Identification, Creation, Execution and Wait
o Process Life Cycle
[Lab 3] Process Operations, Signal and Pipe
Week 4. Process: from Kernel Space
o User time vs. System time
o System call: working inside the kernel
o Process Blossoming
o Process Life Cycle: a deeper view
[Lab 4] Project I Explanation and Process Exercise
Week 5. Signal
o Hardware Signals
o POSIX Signals Basics
o Handling POSIX Signals
o Foreground and Background Jobs
[Lab 5] Process Exercise (continue)
Week 6. Job Scheduling
o Context Switch
o Scheduling: Basics and Algorithms
[Lab 6] Implementation of Job Scheduling Algorithms
Week 7. Synchronization
o Inter Process Communication: Concepts, Race Condition and Mutual Exclusion
o User Level Synchronization: Busy Waiting, Spin Smarter and Semaphore
o Producer-Consumer Problem
o Dining Philosopher Problem
[Lab 7] Concurrency: Mutual Exclusion and Synchronization
Week 8. Thread and Deadlock
o Thread: Concepts and Benefits
4
o User Thread vs. Kernel Thread
o Starvation vs. Deadlock
o Deadlock: Requirements, Detection and Prevention
[Lab 8] Reader-Writer Problem, Producer-Consumer Problem and Dining Philosopher Problem
Week 9. Address Translation
o Memory Multiplexing
o Address Translation: Base&Bound, Segmentation and Paging
[Lab 9] Memory Management: Uniprogramming, Multiprogramming, Segmentation and Paging
Week 10. Caching
o The Principle of Locality
o Major Categories of Cache Missing
o Cache Organization
[Lab 10] Project II Explanation, System Calls and Caching
Week 11. Demand Page
o Replacement Policies: FIFO, LRU and MIN
o Clock Algorithm and N-chance Clock Algorithm
o Page Fault
o Demand Page Mechanism
[Lab 11] Caching Strategies
Week 12. General I/O
o I/O Device Types
o I/O Controller
o Notification Mechanism
o Device Driver Interface to I/O devices
[Lab 12] Caching Strategies (continue)
Week 13. Storage and Performance
o SSD and HDD
o I/O Performance
o Queuing Theory and Little’s Law
o Disk Scheduling Algorithms
[Lab 13] Disk Scheduling
Week 14. File System I
o File System Layout
o File Header: inode
o File Allocation Table Schema
[Lab 14] Project III Explanation
Week 15. File System II
o File System Naming
o Multilevel Indexed Schema
[Lab 15] Revision, Q&A
Week 16. Summary & Revision
[Lab 16] Revision, Q&A
5
Week 1. 课程信息和操作系统介绍
o 介绍背景知识、教学大纲和成绩标准
o 什么是操作系统
o 操作系统做什么
o 操作系统基础
o 什么是进程
o 什么是 shell
o 什么是系统调用
o 操作系统的组成
[Lab 1]基本 shell 命令和基本 C 语言编程简介
Week 2. 基本操作系统概念
o 计算机组成原理复习
o 操作系统内核的数据结构
o 操作系统的历史
o 四个操作系统的基本概念:线程、地址空间、进程和双模型。
[Lab 2] Shell 编程简介
Week 3. 用户角度的进程
o 什么是进程?
o 进程:识别、创建、执行和等待
o 进程的生命周期
[Lab 3] 进程操作、信号和管道
Week 4. 内核角度的进程
o 用户时间与系统时间
o 系统调用如何在内核内工作
o 进程的扩展
o 更深层次理解进程的生命周期
[Lab 4] 项目一说明与进程练习
Week 5. 信号
o 硬件信号
o POSIX 信号基础
o 处理 POSIX 信号
o 前台和后台任务
[Lab 5] 进程相关的练习
Week 6. 任务调度
o 上下文切换
o 调度:基础知识和算法
6
[Lab 6] 任务调度算法的实现
Week 7. 同步
o 进程间通信:概念、竞争条件和互斥
o 用户级同步:忙等待、智能旋转和信号量
o 生产者-消费者问题
o 哲学家就餐问题
[Lab 7] 并发:互斥和同步
Week 8. 线程和死锁
o 线程:概念和好处
o 用户线程与内核线程
o 饥饿与死锁
o 死锁:条件、检测和预防
[Lab 8] 读写者问题、生产者-消费者问题、哲学家就餐问题
Week 9. 地址翻译
o 存储器多路复用
o 地址转换:分段和分页
[Lab 9] 内存管理:分段和分页
Week 10. 缓存
o 区域性原则
o 缺少缓存的主要类别
o 缓存组织
[Lab 10] 项目二说明、系统调用和缓存
Week 11. 需求分页
o 更换政策:FIFOLRU MIN
o 时钟算法和 N 次时钟算法
o 页面错误
o 需求分页的机制
[Lab 11] 缓存策略
Week 12. I/O
o I/O 设备类型
o I/O 控制器
o 通知机制
o 设备驱动程序接口到 I/O 设备
[Lab 12] 缓存策略
Week 13. 储存和性能
7
o 固态硬盘和硬盘
o I/O 性能
o 排队论和小定律
o 磁盘调度算法
[Lab 13] 磁盘调度
Week 14. 文件系统 I
o 文件系统布局
o 文件头:inode
o 文件分配表模式
[Lab 14] 项目三说明
Week 15. 文件系统 II
o 文件系统命名
o 多级索引模式
[Lab 15] 复习与答疑
Week 16. 复习与总结
[Lab 16] 复习与答疑
18.
教材及其它参考资料 Textbook and Supplementary Readings
Operating System Concepts, 9th Edition, Abraham Siberschatz et. al.
Operating Systems Principles & Practice, 2nd Edition, Thomas Anderson et. al.
操作系统课程设计, 机械工业出版社, 朱敏, 唐博等
课程评估 ASSESSMENT
19.
评估形式
Type of
Assessment
评估时间
Time
占考试总成绩百分比
% of final
score
违纪处罚
Penalty
备注
Notes
出勤 Attendance
课堂表现
Class
Performance
小测验
Quiz
10%
Ten in-class quizzes
10 次随堂测验
课程项目 Projects
36%
Three projects
3 次课程项目
平时作业
Assignments
20%
Ten lab assignments, including
program and report.
10 次实验课作业,包括程序和报告
期中考试 1
Mid-Term Test1
10%
Closed book exam
闭卷考试
期中考试 2
Mid-Term Test2
10%
Closed book exam
闭卷考试
8
期末考试
Final Exam
14%
Closed book exam
闭卷考试
期末报告
Final
Presentation
其它(可根据需
改写以上评估方
式)
Others (The
above may be
modified as
necessary)
20.
记分方式 GRADING SYSTEM
A. 十三级等级制 Letter Grading
B. 二级记分制(通/不通过) Pass/Fail Grading
课程审批 REVIEW AND APPROVAL
21.
本课程设置已经过以下责任人/员会审议通过
This Course has been approved by the following person or committee of authority