慶應義塾大学
2008年度 春学期
システム・ソフトウェア
System Software / Operating Systemsオペレーティングシステム
第1回 4月8日 OSの歴史と基本概念
Lecture 1, April 8: OS History and Basic Principles概念
Outline of This Lecture
- Review of Students' Programming Backgrounds
- Course Outline
- Prerequisite前提・前提知識s
- Grading Criteria and Requirements
- Contact Information, Office Hours and Class Notes
- Operating Systemオペレーティングシステム Principles概念
- Operating Systemオペレーティングシステム History
- Computing Today
- Homeworkかだい
Review of Students' Programming Backgrounds
Take a sheet of paper. On it, put your name and student ID number. Then answer the following questions:
- Do you currently have a working C compiler on your system?
現在、C言語のコンパイラーを持っていますか。
- List the operating systemsオペレーティングシステム and versions you have used:
今までの使ったことがあるオペレーティングシステムをリストアップしてください。
Microsoft Windows, MacOS, Linux, FreeBSD, Solaris?
- How many years ago did you start programming?
何年前にプログラ
ミングを始まったでしょう。
- Have you administered a multi-user computer system before, such as
a web server or file server?
マルチユーザーのコンピューター(ウェブサーバー、ファイルサーバーなど)を管理したことありますか。
- Have you managed the following services:
以下のサービスを管理したことありますか。
networking, file, web, compute, DNS, public key?
- List the languages you have programmed in:
今までの使ったことがある言語をリストアップしてください:
assembler, BASIC, C, C++, Fortran, Java, Lisp, Perl, Python, Ruby, sh, ...?
- Which tools have you used:
このリストの中にはどのツールを使ったことがある:
make, CVS, RCS, Microsoft VisualC etc.,
automake, grep, sed, awk, lex/flex, yacc/bison, Spirit, ...?
- What is the longest program you have written, measured in lines?
ひとつのプログラムは何行まで書きましたか。
- When you write code, do you write comments?
プログラムを書いているとき、コメントを書きますか。
- Have you worked in a team to write one program? What source code
control system did you use? How did you divide up the work, and how
did you define and test interfaces between members of the team?
一
人以上のグループでプログラムを書いたことありますか。ソースコードコント
ロールはどうやってしましたか。仕事がどうやって分割しましたか。インター
フェースの定義のしかたには何をしましたか。
Course Outline
教科書 Textbook
モダンオペレーティングシステム
原著第 2 版
アンドリュー・S・タネンバウム=著
水野忠則,太田剛,最所圭三,福田晃,吉澤康
文=訳
ピアソン・エデュケーション
ISBN4-89471-537-6
Modern Operating Systemsオペレーティングシステム, 2nd edition
Andrew S. Tanenbaum
Pearson Education
ISBN-13: 978-0130313584
ISBN-10: 0130313580
Lecture by Lecture
- 第1回 4月8日 OSの歴史と基本概念
Lecture 1, April 8: OS History and Basic Principles概念
- 第2回 4月15日 システムコール
Lecture 2, April 15: System Calls
- 第3回 4月22日 プロセスとスレッド
Lecture 3, April 22: Processes and Threads
- 第4回 5月13日 プロセス間通信
Lecture 4, May 13: Inter-process Communication通信
- 第5回 5月20日 プロセススケジューリング
Lecture 5, May 13: Process Scheduling
- 第6回 5月27日 メモリ管理と仮想記憶
Lecture 6, May 27: Memory Management and Virtual Memory仮そう記録
- 第7回 6月3日 ページ置換アルゴリズム
Lecture 7, June 3: Page Replacementページ置き換え Algorithms
- 第8回 6月10日 ネットワーク&セキュリティ
Lecture 8, June 10: Networking & Security
- 第9回 6月17日 ファイルシステム
Lecture 9, June 17: File Systems
- 第10回 6月24日 ファイル・システムの実装
Lecture 10, June 24: File System Implementation実装s
- 第11回 7月1日 入出力
Lecture 11, July 1: Input/Output Systems
- 第12回 7月8日 ハイパーバイザー
Lecture 12, July 8: Hypervisors
- 第13回 7月15日 OS事例研究
Lecture 13, July 15: Operating Systemsオペレーティングシステム Research
前提知識
Prerequisite前提・前提知識s
I am flexible about how formal your background is, but there are a few
concepts you need to know:
- The basic hardware parts of a computer:
- Programming skills: you must be able to program in some language,
preferably C.
- You must know the basic concept of memory addresses (in C,
pointers).
- You must be comfortable
with Hexadecimal十六進法">hexadecimal十六進法
and binary二進法 manipulation of numbers.
Requirements
The course consists of thirteen ninety-minute classes. Students are
expected to read a large number of papers on systems software and
maintain notes and a bibliography, contribute to classroom
discussions, and complete weekly homeworkかだい. A large-scale software
project will contribute the bulk of the grade.
成績の仕方
Grading
Your grade will be determined as follows:
- 授業の討論/Class participation: 10%
- 宿題/Homeworkかだい: 50%
- 学期のプロジェクト/Term project: 40%
宿題とノート
Homeworkかだい and Notes
授業の為のブログ又はウェブページを作ってください。無料のサービスかキャン
パス内のウェブページを使っても結構です。成績をつけるために、宿題とかブ
ログに入力してください。プライバシーがほしい方はパスワードをつけても良
い。コメントを入力できるブログが優遇である。
You will need to create a class blog. You can use any of the free
blogging services. You will post your homeworkかだい on your blog for me to
grade. If you are concerned about privacy, you may use a
password-protected site. Your blog should allow me to post comments
on it as part of the grading of your work.
Term Project
You will complete a moderately large software project during the
term. Projects may be individual, or teams of up to three students.
We will talk about ideas for specific projects next week. The
following schedule applies:
- Project and team proposals due (on your blog): May 1
- Review of proposals returned: May 13
- Revised project proposals due: May 20
- Final approval of projects, implementation実装 begins: May 20
- Weekly reviews begin: May 27
- Mid-term progress review: June 17
- Final evaluation of projects (face-to-face): July 15-24
Contacting Me/Office Hours/Class Notes
連絡先/オフィスアワー
If you need to contact me, email is the preferred method. Please put
"OS:" in the Subject field of the email. If I do not respond to a
query within 24 hours, please resend. For more urgent matters, junsec
should know how to get ahold of me.
Office Hours, Spring 2008春のオフィスアウアー:Wednesday (水曜日),
9-12, Delta N205. You may come to my office during this time without
an appointment. If you wish to see me otherwise, you can attempt to
find me directly, or send me email to arrange an appointment.
The lecture notes for each week are posted in SFC-SFS shortly before
the lecture.
Operating Systemオペレーティングシステム Principles概念
オペレーティングシステムの概念
Two principles概念: everything is distributed分散, and everything is
concurrent同時実行・平行. Relativity相対性理論 (special, at least) applies to software. That
is, when attempting to perform any operation, you must consider how to
move the information you need to where you are, and you must consider
the effect of any other possible operation happening at the same time
elsewhere in the system.
ふたつの概念:全ての情報は分散である、とすべてのことは同時でやる。
特殊相対性理論はソフトウエアでも影響する。何かを処理しようとすると
き、必要なデータが保存してあるところから現在地にはこんでこなければいけ
ない。ほかのところでほか関数されることも考えておかなければいけない。
You must consider the light cone光円錐 of information.
光円錐をかんがえなければならない。
Tanenbaum defines an operating systemオペレーティングシステム from two primary points of view:
that it is a resource managerリソースマネージャ(管理), and that it serves to extend the
machine. I consider two other concepts to be so fundamental that I
rank them alongside those two: naming, and data movementデータ転送.
オペレーティングシステムの定義として、Tanenbaumの観点はふたつである:
オペレーティングシステムはリソースマネジャ、とオペレーティングシステム
は拡張マシンです。私の意見で、もうふたつのこと同じぐらいのレベル重要だ
と思います:ネーミングとデータの転送。
- Resource management/リソース管理
- Synchronization同期: correctness, efficiency, deadlock avoidance
- Fair and/or appropriate allocation of resources
- Security
- Extension of the machine/拡張マシン
- Expand memory through virtual memory仮そう記録
- Expand non-volatile storage through file systems, volume
managers, and network/distributed分散 file systems
- Naming/ネーミング
Naming is one of the principle概念 functions of all computer systems.
- Storage: registers, cache, main memory, disk memory, removable
devices
- Hardware: devices, especially dynamic ones (USB, iSCSI, etc.)
- Virtual objects: processes, pipes
- Data: URLs, URIs
- Sharing names
- Data movementデータ転送/データ転送
Generally, user programs do not move data directly; they must ask the
operating systemオペレーティングシステム to do it for them.
- Moving data: buses, networks
- Controlling the movement: registers, RPC, third-party transfers,
etc.
- Performance: data layout, resource allocation at multiple levels
(e.g., I/O bus and memory bus)
- Real-time constraints: buffering, jitter, missed revolutions,
tape stalls
These will be considered, along with papers on how to structure a
system. Although it is important to understand a system as thoroughly
as possible, students will also begin to recognize the value of being
able to use, modify, and debug systems they do not completely
understand, and how to build systems in which this is possible.
Operating Systemオペレーティングシステム History
オペレーティングシステムの歴史
In the mid-twentieth century, there was much excitement over the
design of digital computers. Early important names include John von
Neumann, Konrad Zuse, J. Presper Eckert, John William Mauchly, and
Maurice Wilkes; I encourage you look up those names and study their
contributions. The term "von Neumann architecture" is generally used
to refer to a computer that can store a program as a form of data,
rather than in the wiring of the computer itself, though it is
generally acknowledged that all of the above contributed to the basic
ideas. Without this innovation, the field of computer software would
be very dry!
By the mid-1950s, computers made of transistors and capable of storing
their programs were becoming common. At first, each program
controlled the entire computer; it was like reformatting your hard
disk each time you wanted to run a different program -- except, of
course, this was before the invention of the hard disk! Programs were
on decks of punch cards instead. Individuals used the computer for a
single program for hours at a time. Each program had to know how to
control all of the hardware of the entire computer that it intended to
use. (The first hard disk, the IBM 305 RAMAC, held five megabytes and
was introduced in 1956.)
At the same time, the first high-level languages and compilers, of
which FORTRAN is the most prominent example, were being developed.
During this time, batch system operating systemsオペレーティングシステム were created.
The computer was run by operators, a specialized profession of
people who did not necessarily write programs, but knew how to run a
progam on the computer. They took card decks from programmers, fed
them to the computer, and returned the original program and data card
decks and the output data card deck to the programmers.
On April 7, 1964, IBM introduced the System/360. It was a watershed
event in computing history, but for our purposes there are two major
innovations:
- Portable software.
- Multiprogramming.
Around 1960, it was realized that more than one user could be seated
at a terminal端末 at the same time, and that each user spends most
of his time thinking, which would allow the computer to be
idle. Fernando
J. Corbató led the development of the Compatible Time
Sharing System (CTSS), but Corbató
credits John
McCarthy with the original idea. Corby went on to lead the
development of
Multics, which would
ultimately lead to the development of
Unix. With these systems, and others such as some of the
operating systemsオペレーティングシステム from Digital Equipment Corporation (DEC), especially
VMS, the idea of computers that could do many things at once
and support many users at the same time became common.
In the late 1970s, personal computers began to appear; their history
followed the same sequence as above, only faster. Initially a
personal computer could run only a single program. Later, systems
could run more than one program, but with no hardware protection for
the separate programs, crashes were common as programs interfered with
one another. Finally, more "modern" PC operating systemsオペレーティングシステム adopted the
widely-accepted notions of a kernel and common libraries
that allowed programs to more efficiently and safely share a computer.
Programs in these systems are run in a process. Today's PC
operating systemsオペレーティングシステム, such as Linux,
Microsoft Windows, and MacOS, are heavily derived from
the systems mentioned above. They also commonly ship with a GUI
and many utilities, including shells, editors, compilers, and graphics
tools, that are not strictly part of the OS itself.
Computing Today
I want to finish with a few thoughts about the current trends in
computer systems. If you are not aware of these trends, you should
be; they will affect your career.
- We are in the Late Moore's
Law Period.
- no more clock speed increases
- multicore (& radical ideas such as TRIPS, WaveScalar)
- 1000x in chip density to come before we exhaust Moore
- heat management critical
- fault tolerance at all levels critical
- CRA architecture "Grand Challenge" 1TOP/W (10000x improvement,
0.001 nJ/op (1E-12 Joules); I think that's per instruction, not
gate (binary二進法 op); leaves room for 3.5E8 gates/"op"; it's gotta be
right up against the Landauer limit)
- The Google era: we can create enormous amounts of data, but can we
manage it, both locally and globally? Organizing and finding data
is now harder than processing it.
- Mobile and ubiquitous computing.
- Web 2.0: AJAX and asynchronous非同期 computing.
- Virtualization of machines, and even networks.
Readings
Readings to match this week's lecture:
Homeworkかだい
This week's homeworkかだい:
- Establish a homeworkかだい blog for your notes and homeworkかだい. Send me
the URL. If you wish your blog to be private, you can
password-protect it and send me the password.
- Demonstrate that you have a working compiler setup where you will
be able to write programs for class. Capture the output of the
compilation and execution of a simple program (such as "Hello, world")
and post it on your blog. Include the amount of time it took you to
complete this exercise.
- Read the paper above (Levin) and post your notes
about the papers on your blog. (It is not necessary to write up notes
about the readings from the textbook.)
- If you have additional thoughts about the above discussion of
programming experience, please email me or post them on your blog.
- What are the following hexadecimal十六進法 numbers, in binary二進法 and
in decimal?
- 0x64
- 0x1000
- 0x100
- 0x400
- 0x1049
- Read the text for next week.
Next Lecture
Next lecture:
第2回 4月15日 システムコール
Lecture 2, April 15: System Calls
- Discussion of Lampson and Levin: What makes a good system?
- System Calls
- Discussion of term projects
Readings for next week:
- Tanenbaum, 1.5-1.6
- If you are not familiar with hardware, Tanenbaum 1.4
- The Levin paper, cited above
その他 Additional Information