高等学校 操作系统课程 庐山研讨班 北京大学信息学院 陈向群 2005 , 07
description
Transcript of 高等学校 操作系统课程 庐山研讨班 北京大学信息学院 陈向群 2005 , 07
CS 414/415: Spring 2005Systems Programming and Operating Systems -1
CS 415 Projects: • This semester, the project component of the
course will involve several projects which will start small and build up to an ad-hoc networking system on handheld computers.
• The first two project assignments will involve building a prototype operating system.
The first assignment is to implement our own threads, scheduling, and synchronization mechanisms at user level on top of NT.
• We will use the facilities provided by NT mostly to bootstrap our own OS.
The second one will add preemption and introduce interrupt-driven networking.
CS 414/415: Spring 2005Systems Programming and Operating Systems - 2
• For the third assignment, we will switch from NT to CE devices (Palmax 600's) donated by Microsoft. We have 30 Palmax 600's and 70 HP Jornadas with wireless networking cards for this course.
• The "default" class project for this semester will involve peer-to-peer messaging in an ad-hoc network.
• Students are encouraged to work in pairs and to modify their project.
CS 414/415: Spring 2005Systems Programming and Operating Systems - 3
Nachos Assignments
• Lab 1: The Trouble with Concurrent Programming
• Lab 2: Threads and Synchronization • Lab 3: Programming with Threads • Lab 4: Multiprogrammed Kernel • Lab 5: I/O • Lab 6: Virtual Memory
在模拟硬件环境上设计一个小型 OS
• The code for this semester is divided into two main parts:
OS/161: the operating system that you will augment in subsequent homework assignments.
System/161: the machine simulator which emulates the physical hardware on which your operating system will run.
• This course is about writing operating systems, not designing or simulating hardware.
OS/161 & CS161
• The OS/161 distribution contains a full operating system source tree, including some utility programs and libraries. After you build the operating system you boot, run, and test it on the simulator.
• We use a simulator in CS161 because debugging and testing an operating system on real hardware is extremely difficult. The System/161 machine simulator has been found to be an excellent platform for rapid development of operating system code, while still retaining a high degree of realism. Apart from floating point support and certain issues relating to RAM cache management, it provides an accurate emulation of a MIPS R3000 processor.
Assignments
There will be an OS/161 programming assignment for each of the following topics:
• ASST1 : Synchronization and concurrent programming
• ASST2 : System calls and multiprogramming • ASST3 : Virtual memory • ASST4 : File systems • ASST5 : Wireless scavenger hunt using motes
As part of the course, you will complete four large programming projects that each highlight a major subsystem of modern operating systems.
Starting with a minimally featured instructional
operating system, you will add more functionality over the course of the quarter until you have a small, fairly featureful OS.
CS140 Course Information -1
You are allowed to work in groups of up to three. Because of the scope of the projects, and
because in the Real World projects tend to have more people, we highly recommend working with a full group.
Groups of two (or one, which is highly discouraged) are acceptable, but be aware the size of the assignments is the same regardless of the size of the group.
Team members will all receive the same grade on the programming assignments.
CS140 Course Information -2
每个学生编写一个简单的整体式 OS
• Students, working individually, write a simple, monolithic operating system in C.
• While not supporting the full set of features that most production operating systems possess, the OS written by each student is on par technically with any modern operating system.
• Virtual memory (including copy-on-write fork()s and demand loading of files), threading, an extensible file system infrastructure (vnode/vfs), and a competent on-disk file system are a few of the things implemented by every student.
Princeton 大学实习项目 - 1
The six projects in this course are designed to do exactly that. At the end of the class, you will have a small, real operating system kernel. This set of projects were co-developed with colleagues at University of Tromso in Norway.
Project 1: Bootup Mechanism This project involves writing the bootup code f
or a simple operating system that we will be developing for the rest of the semester. In this project, the bootup code will be in the so called real mode (instead of protected mode).
Project 2: Non-Preemptive Scheduling With the bootup mechanism built in the first pr
oject, we can start developing a operating system kernel. The goal of this project is to design and implement a simple multiprogramming kernel with a non-preemptive scheduler. Although the kernel will be very primitive, you will be dealing with several main mechanisms and apply techniques that are important for building multiprogrammed operating systems
Princeton 大学实习项目 - 2
Project 3: Preemptive Scheduling The last project is a simple but useful non-pre
emptive, multi-threaded operating system. The main goal of this project is to transform the non-preemptive kernel into a preemptive kernel. You will also change the system call mechanism from a simple function call (like the last assignment) to an interrupt mechanism akin to current operating systems. Also, you will be required to add condition variables to augment the synchronization primitives designed during the last project.
Princeton 大学实习项目 - 3
Project 4: Interprocess Communication and Process Management
This project basically consists of two separate parts. The first part is Inter-Process Communication (IPC) mechanism, and the second is Process Management.
Princeton 大学实习项目 - 4
Project 5: Virtual Memory This project will require you to implement a simple vir
tual memory mechanism in your operating system. The processes will now each execute in a separate virtual address space. These address space will be protected from each other, so one process may not access or modify data in another address space. Additionally the kernel will also be protected from the processes in a similar manner. In this project the kernel and the kernel threads run in kernel mode (privilege level 0) and the processes are executed in user mode (privilege level 3).
Your task in this project is to implement a simple, demand-paged virtual memory system with a floppy diskette.
Princeton 大学实习项目 - 4
Project 6: A File System
In this project, you will implement a UNIX-like but greatly simplified file system in your operating system. The file system will reside on the floppy disk.
Princeton 大学实习项目 - 5
2005 年 7 月 OS 教材采用统计结果 - 1
被统计大学:• 35 所大学,包括美国、欧洲、亚洲和大洋州• 其中包括复旦大学、南京大学、上海交通大学 西安交通大学、浙江大学和中国科技大学
• 采用 Silberschatz and Galvin 的 《 Operating System Concepts 》 作为教材或参考书籍的有 27 家
• 采用 Andrew S. Tanenbaum 的 《 Modern Operating Systems 》 作为教材或参考书籍的有 15 家• 采用 Andrew S. Tanenbaum and Albert S.
Woodhull 的 《 Operating Systems: Design and Impl
ementation 》 作为教材或参考书籍的有 8 家
2005 年 7 月 OS 教材采用统计结果 - 2
依据 Pearson Education 有关 Web 站点在 2005 年 7 月的介绍 至少有 19 所大学在其 Web 站点上直接表明 采用 了 William Stallings 的《 Operating Systems: Internals and Design
Principles 》教材
2005 年 7 月 OS 教材采用统计结果 - 3
• 从各个大学的 OS 课程的提纲和讲稿来看 绝大部分内容都和我们的课程内容类似
• 大多数学校使用的教材是 《 Operating System Concepts 》 或者《 Modern Operating Systems 》 很多大学就用配套的 ppt
对国外若干大学 OS 课程的看法 - 1
值得借鉴之处
• 大多学校比较注重 OS 安全性方面的知识• 一些学校比较强调体系结构的知识,例如剑桥• 有些学校的课程中强调了 OS 对于网络的支持 介绍了 SOCKETS , TCP/IP ,网络 OS 等概
念 例如 UC Berkely , standford 和牛津 牛津更是把网络和 OS 做为一门课程来学习
对国外若干大学 OS 课程的看法 - 1