2010年度 春学期

System Software / Operating Systems

2010年度春学期 火曜日2時限
科目コード: 60730
担当: Rodney Van Meter
E-mail: rdv@sfc.keio.ac.jp

第1回 4月8日 OSの歴史と基本概念
Lecture 1, April 8: OS History and Basic Principles

Outline of This Lecture

Review of Students' Programming Backgrounds

Take a sheet of paper. On it, put your name and student ID number. Then answer the following questions:

  1. Do you currently have a working C compiler on your system?
  2. List the operating systems and versions you have used:
    Microsoft Windows, MacOS, Linux, FreeBSD, Solaris?
  3. How many years ago did you start programming?
    何年前にプログラ ミングを始まったでしょう。
  4. Have you administered a multi-user computer system before, such as a web server or file server?
  5. Have you managed the following services:
    networking, file, web, compute, DNS, public key?
  6. List the languages you have programmed in:
    assembler, BASIC, C, C++, Fortran, Java, Lisp, Perl, Python, Ruby, sh, ...?
  7. Which tools have you used:
    make, CVS, RCS, Microsoft VisualC etc., automake, grep, sed, awk, lex/flex, yacc/bison, Spirit, ...?
  8. What is the longest program you have written, measured in lines?
  9. When you write code, do you write comments?
  10. 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 版

Modern Operating Systems, 2nd edition
Andrew S. Tanenbaum
Pearson Education
ISBN-13: 978-0130313584
ISBN-10: 0130313580

Lecture by Lecture


I am flexible about how formal your background is, but there are a few concepts you need to know:


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.


Your grade will be determined as follows:

Homework and Notes

授業の為のブログ又はウェブページを作ってください。無料のサービスかキャン パス内のウェブページを使っても結構です。成績をつけるために、宿題とかブ ログに入力してください。プライバシーがほしい方はパスワードをつけても良 い。コメントを入力できるブログが優遇である。

You will need to create a class blog (or wiki). 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:

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 2010春のオフィスアウアー:Wednesday (水曜日), 9-12, Delta N211. 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.


lightcone (Wikipedia)
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の観点はふたつである: オペレーティングシステムはリソースマネジャ、とオペレーティングシステム は拡張マシンです。私の意見で、もうふたつのこと同じぐらいのレベル重要だ と思います:ネーミングとデータの転送。

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.)

							      RAMAC disks
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:

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.

Multics machine with tape and disk (from multicians.org)
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.
Moore's Law transistors per chip graph from Intel Transistor channel length, from ITRS


Readings to match this week's lecture:


This week's homework:

  1. 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.
    この授業のために、ブログを作ってください。私にURLを送ってください。 プラバシーがかけたい人はパスワードをつけて、送ってください。
  2. 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.
    C言語のコンパイラがあると証明して。簡単なプログラム("Hello, world" など)を書いて、ソースと実行のアウトプットをブログに。かかった時間 も記録してください。
  3. 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.) 
    上のLevinの論文を読んで、自分の意見、学んだことなどのノートを取っ て、ブログに入れて。(教科書で読んだところのログは必要ありません。)
  4. Start reading the Lampson paper; for non-native English speakers, it is apparently a long paper, so I will give you two weeks.
    Lampsonの論文読み始まって。「長い」という意見を持っている人います ので、二週間で読む。
  5. If you have additional thoughts about the above discussion of programming experience, please email me or post them on your blog.
  6. What are the following hexadecimal numbers, in binary and in decimal?
    1. 0x64
    2. 0x1000
    3. 0x100
    4. 0x400
    5. 0x1049
  7. Define the words "pointer" and "memory address".
  8. Read the text for next week.

Next Lecture

Next lecture:

第2回 4月20日 システムコール
Lecture 2, April 20: System Calls

Readings for next week:

その他 Additional Information