没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
a very good book for freshman to understand how to build a operating system. the auther is humorous and there are many programs for reader to practice on the computer
资源推荐
资源详情
资源评论
Preface
To Everyone
Welcome to this book! We hope you’ll enjoy reading it as much as we enjoyed
writing it. The book is called Operating Systems: Three Easy Pieces,andthetitle
is obviously an homage to one of the greatest sets of lecture notesevercreated,by
one Richard Feynman on the topic of Physics [F96]. While this book will undoubt-
edly fall short of the high standard set by that famous physicist, perhaps it will be
good enough for you in your quest to understand what operating systems (and
more generally, systems) are all about.
The three easy pieces refer to the three major thematic elements the book is
organized around: virtualization, concurrency,andpersistence. In discussing
these concepts, we’ll end up discussing most of the important things an operating
system does; hopefully, you’ll also have some fun along the way. Learning new
things is fun, right? At least, it should be.
Each major concept is divided into a set of chapters, most of which present a
particular problem and then show how to solve it. The chapters are short, and try
(as best as possible) to reference the source material where the ideas really came
from. One of our goals in writing this book is to make the paths of history as clear
as possible, as we think that helps a student understand what is,whatwas,and
what will be more clearly. In this case, seeing how the sausage was made is nearly
as important as understanding what the sausage is good for
1
.
There are a couple devices we use throughout the book which are probably
worth introducing here. The first is the crux of the problem. Anytime we are
trying to solve a problem, we first try to state what the most important issue is;
such a crux of the problem is explicitly called out in the text, and hopefully solved
via the techniques, algorithms, and ideas presented in the rest of the text.
In many places, we’ll explain how a system works by showing its behavior
over time. These timelines are at the essence of understanding; if you know what
happens, for example, when a process page faults, you are on your way to truly
understanding how virtual memory operates. If you comprehend whattakesplace
when a journaling file system writes a block to disk, you have taken the first steps
towards mastery of storage systems.
There are also numerous asides and tips throughout the text, adding a little
color to the mainline presentation. Asides tend to discuss something relevant (but
perhaps not essential) to the main text; tips tend to be general lessons that can be
1
Hint: eating! Or if you’re a vegetarian, running away from.
iii
iv
applied to systems you build. An index at the end of the book lists all of these tips
and asides (as well as cruces, the odd plural of crux) for your convenience.
We use one of the oldest didactic methods, the dialogue, throughout the book,
as a way of presenting some of the material in a different light. These are used to
introduce the major thematic concepts (in a peachy way, as we willsee),aswellas
to review materi al every now and then. They are also a chance to write in a more
humorous style. W hether you find them useful, or humorous, well, that’sanother
matter entirely.
At the beginning of each major section, we’ll first present an abstraction that an
operating system provides, and then work in subsequent chapters on the mecha-
nisms, policies, and other support needed to provide the abstraction. Abstractions
are fundamental to all aspects of Computer Science, so it is perhaps no surprise
that they are also essential in operating systems.
Throughout the chapters, we try to use real code (not pseudocode)wherepos-
sible, so for virtually all examples, you should be able to type them up yourself
and run them. Running real code on real systems is the best way to learn about
operating systems, so we encourage you to do so when you can.
In various parts of the t ext, we have sprinkled in a few homeworks to ensure
that you are understanding what is going on. Many of these homeworks are little
simulations of pieces of the operating system; you should download the home-
works, and run them to quiz yourself. The homework simulators have the follow-
ing feature: by giving them a different random seed, you can generate a virtually
infinite set of problems; the simulators can also be told to solve the problems for
you. Thus, you can test and re-test yourself until you have achieved a good l evel
of understanding.
The most important addendum to this book is a set of projects in which you
learn about how real systems work by designing, implementing, and testing your
own code. All projects (as well as the code examples, mentioned above) are in
the Cprogramminglanguage[KR88]; C is a simple and powerful language that
underlies most operating systems, and thus worth adding to your tool-chest of
languages. Two types of projects are available (see the onlineappendixforideas).
The first are systems programming projects; these projects are great for those who
are new to C and UNIX and want to learn how to do low-level C programming.
The second type are based on a real operating system kernel developed at MIT
called xv6 [CK+08]; these projects are great for students that already have some C
and want to get their hands dirty inside the OS. At Wisconsin, we’ve run the course
in three different ways: either all systems programming, all xv6 programming, or
a mix of both.
OPERATING
SYSTEMS
[VERSION 0.90] WWW.OSTEP. ORG
v
To Educators
If you are an instructor or professor who wishes to use this book,pleasefeel
free to do so. As you may have noticed, they are free and availableon-linefrom
the following web page:
http://www.ostep.org
You can also purchase a printed copy from lulu.com.Lookforitontheweb
page above.
The (current) proper citation for the book is as follows:
Operating Systems: Three Easy Pieces
Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau
Arpaci-Dusseau Books
March, 2015 (Version 0.90)
http://www.ostep.org
The course divides fairly well across a 15-week semester, in which you can
cover most of the topics within at a reasonable level of depth. Cramming the
course into a 10-week quarter probably requires dropping some detail from each
of the pieces. There are also a few chapters on virtual machine monitors, which we
usually squeeze in sometime during the semester, ei ther right at end of the large
section on virtualization, or near the end as an aside.
One slightly unusual aspect of the book is that concurrency, a topic at the front
of many OS books, is pushed off herein until the student has built an understand-
ing of virtualization of the CPU and of memory. In our experience in teaching
this course for nearly 15 years, students have a hard time understanding how the
concurrency problem arises, or why they are trying to solve it, if they don’t yet un-
derstand what an address space is, what a process is, or why context switches can
occur at arbitrary points in time. Once they do understand these concepts, how-
ever, introducing the notion of threads and the problems that arise due to them
becomes rather easy, or at least, easier.
As much as is possible, we use a chalkboard (or whitebo ard) to deliver a lec-
ture. On these more conceptual days, we come to class with a few majorideas
and examples in mind and use the board to present them. Handouts are useful
to give the students concrete problems to solve based on the material. On more
practical days, we simply plug a laptop into the projector and show real code; this
style works particularly well for concurrency lectures as well as for any discus-
sion sections where you show students code that is relevant fortheirprojects.We
don’t generally use slides to present material, but have now made asetavailable
for those who prefer that style of presentation.
If you’d like a copy of any of these materials, please drop us an email. We have
already shared them with many others around the world.
One last request: if you use the free online chapters, please just link to them,
instead of making a local copy. This helps us tra ck usage (over 1 million chapters
downloaded in the past few years!) and also ensures students getthelatestand
greatest version.
c
2014, ARPACI-DUSSEAU
THREE
EASY
PIECES
vi
To Students
If you are a student reading this book, thank you! It is an honor for us to
provide some material to help you in your pursuit of knowledge about operating
systems. We both think back fondly towards some textbooks of our undergraduate
days (e.g., Hennessy and Patterson [HP90], the classic book on computer architec-
ture) and hope this book will become one of those positive memories for you.
You may have noticed this book is free and available online
2
. There is one major
reason for this: textbooks are generally too expensive. This book, we hope, is the
first of a new wave of free materials to help those in pursuit of their education,
regardless of which part of the world they come from or how much they are willing
to spend for a book. Failing that, it is one free book, which is better than none.
We also hope, where possible, to point you to the original sources of much
of the material in the book: the great papers and persons who have shaped the
field of operating systems over the years. Ideas are not pulled out of the air; they
come from smart and hard-working people (including numerous Turing-award
winners
3
), and thus we should strive to celebrate those ideas and people where
possible. In doing so, we hopefully can better understand the revolutions that
have taken place, instead of writing texts as if those thoughts have always been
present [K62]. Further, perhaps such references will encourageyoutodigdeeper
on your own; reading the famous papers of our field is certainly one of the best
ways to learn.
2
A digression here: “free” in the way we use it here does not mean open source, and it
does not mean the book is not copyrighted with the usual protections – it is! What it means is
that you can download the chapters and use them to learn about operating systems. Why not
an open-source book, just like Linux is an open-source kernel? Well, we believe it is important
for a book to have a single voice throughout, and have worked hard to provide such a voice.
When you’re reading it, the book should kind of feel like a dialogue with the person explaining
something to you. Hence, our approach.
3
The Turing Award is the highest award in Computer Science; it is like the Nobel Prize,
except that you have never heard of it.
OPERATING
SYSTEMS
[VERSION 0.90] WWW.OSTEP. ORG
vii
Acknowledgments
This section will contain thanks to those who helped us put the book together.
The important thing for now: your name could go here! But, you have to help. So
send us some feedback and help debug this book. And you could be f amous!Or,
at least, have your name in some book.
The people who have helped so far include: Abhirami Senthilkumaran*, Adam
Drescher* (WUSTL), Adam Eggum, Aditya Venkataraman, Adriana Iamnitchi and
class (USF), Ahmed Fikri*, Ajaykrishna Raghavan, Akiel Khan, Alex Wyler, Ali
Razeen (Duke), AmirBehzad Eslami, Anand Mundada, Andrew Valencik (Saint
Mary’s), Angela Demke Brown (Toronto), B. Brahmananda R eddy (Minnesota),
Bala Subrahmanyam Kambala, Benita Bose, Biswajit Mazumder (Clemson), Bobby
Jack, Bj
¨
orn Lindberg, Brennan Payne, Brian Gorman, Brian Kroth, Caleb Sum-
ner (Southern Adventist), Cara Lauritzen, Charlotte Kissinger, Chien-Chung Shen
(Delaware)*, Christoph Jaeger, Cody Hanson, Dan Soendergaard (U. Aarhus), David
Hanle (Grinnell), David Hartman, Deepika Muthukumar, Dheeraj Shetty (North
Carolina State), Dorian Arnold (New Mexico), Dustin Metzler, Dustin Passofaro,
Eduardo Stelmaszczyk, Emad Sadeghi, Emily Jacobson, Emmett Witchel (Texas),
Erik Turk, Ernst Biersack (France), Finn Kuusisto*, Glen Granzow (College of Idaho),
Guilherme Baptista, Hamid Reza Ghasemi, Hao Chen, Henry Abbey, Hrishikesh
Amur, Huanchen Zhang*, Huseyin Sular, Hugo Diaz, Itai Hass (Toronto), Jake
Gillberg, Jakob Olandt, James Perry (U. Michigan-Dearborn)*, Jan Reineke (Uni-
versit
¨
at des Saarlandes), Jay Lim, Jerod Weinman (Grinnell), Jiao Dong (Rutgers),
Jingxin Li, Joe Jean (NYU), Joel Kuntz (Saint Mary’s), Joel Sommers(Colgate),John
Brady (Grinnell), Jonathan Perry (MIT), Jun He, Karl Wallinger, Kartik Singhal,
Kaushik Kannan, Kevin Liu*, Lei Tian (U. Nebraska-Lincoln), Leslie Schultz, Liang
Yin, Lihao Wang, Martha Ferris, Masashi Kishikawa (Sony), Matt Reichoff, Matty
Williams, Meng Huang, Michael Walfish (NYU), Mike Griepentrog, Ming Chen
(Stonybrook), Mohammed Alali (Delaware), Murugan Kandaswamy, Natasha Eil-
bert, Nathan Dipiazza, Nathan Sullivan, Neeraj Badlani (N.C. State), Nelson Gomez,
Nghia Huynh (Texas), Nick Weinandt, Patricio Jara, Perry Kivolowitz, Radford
Smith, Riccardo Mutschlechner, Ripudaman Singh, Robert Ord
`
o
˜
nez and class (South-
ern Adventist), Rohan Das (Toronto)*, Rohan Pasalkar (Minnesota), Ross Aiken,
Ruslan Kiselev, Ryland Herrick, Samer Al-Kiswany, Sandeep Ummadi (Minnesota),
Satish Chebrolu (NetApp), Satyanarayana Shanmugam*, Seth Pollen, Sharad
Punuganti, Shreevatsa R., Sivaraman Sivaraman*, Srinivasan Thirunarayanan*,
Suriyhaprakhas Balaram Sankari, Sy Jin Cheah, Teri Zhao (EMC), Thomas Griebel,
Tongxin Zheng, Tony Adkins, Torin Rudeen (Princeton), Tuo Wang, Varun Vats,
William Royle (Grinnell), Xiang Peng, Xu Di, Yudong Sun, Yue Zhuo (Texas A&M),
Yufui Ren, Zef RosnBrick, Zuyu Zhang. Special thanks to those marked with an
asterisk above, who have gone above and beyond in their suggestions for improve-
ment.
In addition, a hearty thanks to Professor Joe Meehean (Lynchburg) for his de-
tailed notes on each chapter, to Professor Jerod Weinman (Grinnell) and his entire
class for their incredible booklets, to Professor Chien-Chung Shen (Delaware) for
his invaluable and detailed reading and comments, to Adam Drescher (WUSTL)
for his careful reading and suggestions, to Glen Granzow (College of Idaho) for his
detailed comments and tips, and Michael Wa lfish (NYU) for his enthusiasm and
detailed suggestions for improvement. All have helped these authors immeasur-
c
2014, ARPACI-DUSSEAU
THREE
EASY
PIECES
剩余650页未读,继续阅读
资源评论
- SonnyTY2016-07-17很清晰的英文原版
Neroie
- 粉丝: 5
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Python Flask和Web的自动消防控制系统设计源码
- 基于Python和Java语言的汉语言处理工具HanLP设计源码
- 基于MATLAB SIMULINK的异步电动机矢量控制系统 仿真目的:矢量控制的基本思想是把异步电动机经过坐标变等效成直流电动机
- 基于Java语言的牛牛日记前台后端设计源码
- 基于Java开发的人力资源管理系统设计源码
- 基于Java语言的智石室内停车场导航Android SDK设计源码
- 基于Java实现的实时波纹加载特效控件设计源码
- 基于滑膜控制扰动观测器的永磁同步电机PMSM模型 四个控制对比: 1、PID控制器 2、传统滑模控制器 3、最优滑模控制器 4、
- 基于Java开发的大学生图书管理系统设计源码
- 基于Matlab simulink的异步电机SVPWM变频调速建模仿真
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功