第 12 章 总结(Chapter 12 Summary)

This text introduced the main ideas in operating systems by studying one operating system, xv6, line by line. Some code lines embody the essence of the main ideas (e.g., context switching, user/kernel boundary, locks, etc.) and each line is important; other code lines provide an illustration of how to implement a particular operating system idea and could easily be done in different ways (e.g., a better algorithm for scheduling, better on-disk data structures to represent files, better logging to allow for concurrent transactions, etc.). All the ideas were illustrated in the context of one particular, very successful system call interface, the Unix interface, but those ideas carry over to the design of other operating systems.

本文通过逐行研究 xv6 操作系统,介绍了操作系统的核心思想。部分代码体现了核心思想的精髓(例如,上下文切换、用户/内核边界、锁等等),每一行都至关重要;其他代码则展示了如何实现特定的操作系统理念,并且可以轻松地以不同的方式实现(例如,更好的调度算法、更好的磁盘数据结构来表示文件、更好的日志记录以支持并发事务等等)。所有这些思想都基于一个非常成功的系统调用接口(Unix 接口)进行了阐述,但这些思想也适用于其他操作系统的设计。