← 返回首页

操作系统

Operating Systems

课程介绍 Course Introduction

学分:4 | 先修课:数据结构、计算机组成原理 | 学期:第4学期

操作系统课程讲解现代操作系统的核心概念与实现机制。主要内容包括进程与线程管理、CPU调度、进程同步与互斥、死锁处理、内存管理(分页、分段、虚拟内存)、文件系统、磁盘调度、I/O管理与系统安全。课程结合Linux等真实系统源码分析,培养学生理解系统级编程与资源管理的能力,为后续系统开发与底层优化奠定基础。

This course covers core concepts and mechanisms of modern operating systems. Topics include process and thread management, CPU scheduling, synchronization and mutual exclusion, deadlock handling, memory management with paging, segmentation, and virtual memory, file systems, disk scheduling, I/O management, and security. Real systems such as Linux are analyzed to develop system-level programming and resource management skills.

大作业 Final Project

作业标题:Shell命令解释器实现

学生需使用C或C++实现一个简易的Shell命令解释器,支持命令解析、内部命令、外部命令执行、管道、输入输出重定向、后台运行及作业控制等功能。要求使用fork、exec、pipe、dup等系统调用,并正确处理进程同步。交付物为可运行程序、源代码及实现说明文档。

Students implement a simple shell command interpreter in C or C++ supporting command parsing, built-in and external commands, pipes, I/O redirection, background execution, and job control. The project requires fork, exec, pipe, and dup system calls with correct synchronization. Deliverables include a runnable program, source code, and documentation.

实施步骤 Implementation Steps

📋 示例:实现一个简单的操作系统内核功能,比如进程调度或内存分页管理。你需要用C语言模拟短作业优先(SJF)调度算法,计算周转时间和等待时间,或实现LRU页面置换算法并统计缺页率。
步骤 1
Shell需求分析
明确简易Shell功能需求:命令解析、管道、重定向、后台执行等
产出:需求分析文档
步骤 2
进程管理架构设计
设计进程创建(fork)、执行(exec)、等待(wait)的架构
产出:架构设计文档
步骤 3
核心功能实现
实现命令解析、管道通信、输入输出重定向、信号处理
产出:Shell源代码
步骤 4
功能测试验证
测试常用命令执行、管道连接、重定向、后台运行等功能
产出:测试报告
步骤 5
文档整理
整理代码注释和使用说明
产出:最终提交材料

Steps

Step 1
Shell Requirements
Define requirements: command parsing, pipes, redirection, background execution
Deliverable: Requirements Doc
Step 2
Process Management
Design fork, exec, wait architecture
Deliverable: Architecture Design Doc
Step 3
Core Implementation
Implement command parsing, pipe communication, I/O redirection
Deliverable: Shell Source Code
Step 4
Functional Testing
Test commands, pipes, redirection, background execution
Deliverable: Test Report
Step 5
Documentation
Prepare code comments and user manual
Deliverable: Final Submission

Prerequisites · International Exams · Contact · Back to top · Home