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 调度:基础知识和算法