4-Nov-2009: All system files and sample programs have been zipped together and are available in the Hardware Related References section below.
Quick Links:
Tuesdays 7:35-9:35 PM in Science Center 116
Prerequisites: CSCI E-119 (Data Structures), experience using UNIX, or equivalent.
Brief abstract:
This course examines the role of operating systems: process synchronization and scheduling; memory management including virtual memory, swapping, paging, and segmentation; file management; protection and security; input/output techniques, buffering, and resource allocation; deadlock detection and avoidance; system modeling; performance measurement and evaluation; and operating system case studies. An extensive lab project will be required of all students.
4 credits. Noncredit and graduate credit.
Overview:
Computer Science E-251 is a detailed exploration of the internal algorithms and design of operating systems. Students are expected to be comfortable with designing, coding, and debugging programs of reasonable complexity while employing good programming style and structured techniques. In particular, knowledge of C, terminal and text file I/O, classes, and data structures is presumed. During this class, students will use some UNIX system calls to complete the assignments.
In CSCI E-251 graduate-credit students will be expected to write a significant term project. As with all programming courses, the assignments may be time-consuming; therefore, a significant time commitment to the course is necessary. Although the computers are available more-or-less around the clock, occasionally they will suddenly become unavailable (this is known as a crash). As with all such events, they always seem to occur at the worst possible time. Plan your computer work so that it is complete in advance of the deadlines. You have now been forewarned!
Books:
All course books are available from the Harvard Coop.
Textbook:
Modern Operating Systems, Third Edition; Andrew S. Tanenbaum; Prentice-Hall, 2008; ISBN-10 0-13-600663-9; ISBN-13 978-0-13-600663-3
Recommended UNIX and POSIX Library Function Reference Books:
Advanced Programming in the UNIX Environment, Second Edition; W. Richard Stevens and Stephen A. Rago; Addison Wesley Professional, 2005; ISBN-10 0-201-43307-9; ISBN-13 978-0-201-43307-4; ISBN-13 for paperback 978-0-321-52594-9
PThreads Programming: A POSIX Standard for Better Multiprocessing; Bradford Nichols, Dick Buttlar, Jacqueline Proulx Farrell; O'Reilly & Associates, Inc., 1996; ISBN-10 1-56592-115-1; ISBN-13 978-1-56592-115-3
Recommended C Language Reference Manual:
C: A Reference Manual, Fifth Edition; Samuel P. Harbison and Guy L. Steele, Jr.; Prentice-Hall, 2002; ISBN-10 0-13-089592-X; ISBN-13 978-0-13-089592-9
There will also be other handouts & supplementary readings
Instructor:
Dr. James L. Frankel
Teaching Assistants:
Each student is assigned to a Teaching Assistant (TA). Each TA holds weekly sections and office hours as described below. Attendance at your TA's section is strongly recommended. Although your TA should be your primary point of contact for questions and issues, you are welcome to attend another TA's section and/or office hours in addition.
| TA | Section Meeting Time/Place | Office Hours Time/Place | Phone |
|---|---|---|---|
Dmitriy Ginzburg
,
Section Home Page |
Tuesday, 6:30-7:30 PM, Sever Hall, Room 205 |
Tuesday, 6:00-6:30 PM by appt. only, Science Center, Room 101e |
+1.508.397.9256 (10:00 AM - 10:00 PM) If there's no answer, leave a message and a call-back number |
Grading:
Graduate-credit students:
All problem sets and programming assignments are due at midnight on Friday night (unless otherwise stated in the assignment or in the syllabus). Unless otherwise stated, all programming assignment solutions must be written in C, have run on ice.fas.harvard.edu (is01.fas.harvard.edu, is02.fas.harvard.edu, is03.fas.harvard.edu), be submitted using the "submit" program (or via e-mail if agreed to by your TA), be well-written (clear coding style, modular structure, appropriately commented and documented in English), and tested (include any programs and/or shell scripts used in testing your solution and a transcript showing your program being tested (using the "script" program) as part of your submission). The grade for programming assignments will include all of these attributes. (Of course, the solutions may be written and tested using any system of the student's choosing; however, when the solution is complete, it must be moved to the course computers and tested there!) The Science Center computers may be accessed using "ssh" over the Internet. Files may be transferred to these systems using "secure ftp" (SFTP). The SecureCRT and SecureFX programs are available from the Science Center on a CD or at www.fas.harvard.edu/computing/download; these programs implement "ssh" and "secure ftp," respectively. Remember, in addition to handing in all parts of the problem set solution or programming assignment program, sample runs of the program which demonstrate that the program works must be attached. A late homework will lose 5% of its original grade for each day it is late (e.g. an assignment handed in two and a half days late will receive its original grade multiplied by 0.85). Late assignments may be submitted via the "submit" program or e-mailed to your teaching assistant. In addition, each student is given five free late days that may be used freely during the semester. However, keep in mind that the assignments are often built on the previous assignments; handing in one assignment late does not extend the due date for subsequent assignments.
In the preceding paragraph, the phrase "commented and documented" is used; this paragraph will clarify the necessary comments and documentation that should be provided with all programs. First, there should be a description of the entire application. This should include the user interface (i.e., how a user interacts with the program) and an explanation of what the program does. This documentation may be in a separate file from the program itself. Second, there should be a description at the beginning of each file which outlines the contents of that file. Third, each routine, function, method, etc. must be preceded by a section describing: (1) the name of the routine, (2) the purpose/function of the routine, (3) the parameters to the routine (name, type, meaning), (4) the return value from the routine (type, meaning), and (5) any side-effects (including modifying global variables, performing I/O, modifying heap-based storage, etc.) that the routine may cause. Fourth, declarations of variables should be commented with their purpose. Fifth, blocks of code should be commented to describe the purpose of the code section. Sixth, any complex or difficult to understand code statements or fragments should be commented to clarify their behavior.
When using the "submit" program, for the course name specify "libe251"; for the assignment name/number specify "1" for Problem Set 1, "2" for Problem Set 2, etc., specify "7" for the Term Project Proposal, and specify "8" for the Term Project.
Plagiarizing:
All work should be the personal creation of the individual student. Students are free to consult with each other, to study together, etc., but all problem set solutions, programming assignments, and exams must be the personal contribution of that student. If a paper, assignment, or exam contains information taken from another source, that source and material must be explicitly identified and credit given.
Course Outline:
Approximate Schedule:
| August | Description |
|---|---|
| 30 | Registration ends |
| September | Description |
|---|---|
| 1 | Introduction, course information & policies, outline, schedule. Devices. Abstractions provided by the operating system. Operating system structure. |
| 8 | Processes. Synchronization, scheduling. For today, read Tanenbaum chapters 1 and 2. |
| 13 | Late registration (with $50 late fee) ends; last day to withdraw with full-tuition refund; last day for course and credit status changes |
| 15 | Memory management. Virtual memory, swapping, paging, and segmentation. For today, read Tanenbaum chapter 3. |
| 18 at Midnight | Problem Set 1 due. |
| 20 | Last day to withdraw with half-tuition refund |
| 22 | Input/Output systems, file systems, buffering. For today, read Tanenbaum chapters 4 and 5. |
| 29 | Deadlocks: definition, detection, recovery, avoidance, and prevention. For today, read Tanenbaum chapter 6. |
| October | Description |
|---|---|
| 2 at Midnight | Problem Set 2 due. |
| 6 | Security and protection. For today, read Tanenbaum chapter 9. |
| 13 | Midterm exam. Synchronization, threads, RPC. For today, review Tanenbaum chapter 2. |
| 20 | System modeling, performance measurement and evaluation, introduction to distributed systems, DCE/Encina. Distributed file systems. |
| 23 at Midnight | Problem Set 3 due. |
| 27 | Fault tolerance, replication, redundancy. |
| November | Description |
|---|---|
| 3 | Introduction to parallel systems, data parallelism, communication, gang scheduling. For today, review Tanenbaum chapter 8. |
| 6 at Midnight | Problem Set 4 due. |
| 10 | Case study of UNIX/Linux. For today, read Tanenbaum chapter 10. |
| 13 at Midnight | Term Project Proposal due. |
| 17 | Case study of Windows Vista. For today, read Tanenbaum chapter 11. |
| 20 at Midnight | Problem Set 5 due. |
| 25-29 | Thanksgiving break |
| 29 | Last day to withdraw with no tuition refund; credit students receive a WD grade |
| 24 | Case study of Symbian. For today, read Tanenbaum chapter 12. |
| December | Description |
|---|---|
| 1 | Additional topics. For today, read Tanenbaum chapter 13. |
| 4 at Midnight | Problem Set 6 due. |
| 8 | Additional topics. |
| 15-21 | Exam period |
| 15 | Final Class Meeting during usual class time. Term Project due. |
Hardware Related References:
The Renesas Technology M16C:
The Renesas SKP16C62P StarterKit Plus is an evaluation kit for the M30626 microcontroller. The M30626 microcontroller contains an M16C processor core with memory, peripherals, and an LCD controller. The Renesas SKPCOMMS Communications Applications card is a daughter board for SKP StarterKits that adds SRAM, two RS-232 ports, Ethernet, and two CAN ports.
Stack contents for hardware and software interrupt service routines on the M30626 when used via C
Memory map of the M30626 on the SKP16C62P StarterKit with the SKPCOMMS daughter board
All system files and sample programs below zipped together: M16Cfiles.zip
System files for the M30626:
Sample programs for the M30626:
The Microchip Technology PIC:
The example PIC assembly language program, blink.asm, from class to blink the LED's.
The computers for programming PIC's and testing PIC software are available in the PC Lab at 53a Church Street.
Other Components:
Electronics stores in the Greater Boston Area:
Electronics distributors on the Web:
Hardware (as in nuts and bolts, etc.) distibutors on the Web:
Software Related References:
Look here for information about the GNU Project and the Free Software Foundation.
Look here for information about getting GNU Emacs for Windows 95/98/ME/NT/XP and 2000.
Look here for information about getting the Cygwin UNIX environment for Windows.
Look here for GNU manuals online.
Look here for Unix distributions and more.
Look here for information about getting mtools: A collection of utilities to access MS-DOS disks from Unix.
There are computers available for Extension student use in the Science Center and at 53a Church Street.
Harvard Arts and Sciences Computer Services (HASCS):
Tera Term Pro from UNC at Wilmington or from CNET is a free terminal emulator/telnet client for Windows. TTSSH adds SSH capabilities to Tera Term Pro with an open source/free software license.
Course Documents On-Line:
The course questionnaire is available on-line.
The class problem sets are also available:
Problem Set 1,
Problem Set 2,
Problem Set 3,
Problem Set 4,
Term Project Proposal,
Problem Set 5,
Problem Set 6.
A UBB Forum (on-line discussion list) for CSCI E-251 is set up on Harvard Extension School UBB Forums. Groupee's UBB.Threads Software User Guide is available here.
Here is an interesting discussion of the Mars Rover Pathfinder mission involving priority inversion.
Here's the discussion of the crash of the Ariane 5 rocket in HTML format and in text format.
For papers discussing the Internet Worm of November 1988, see note by Gene Spafford & Robert Gasch, General Accounting Office report, University of Lowell report, How to patch the holes, the court appeal, request for comments 1135, MIT-IEEE, MIT, seely, spaf CCR, spaf ESEC.
The C* Slides are available in a variety of formats: PostScript, Microsoft Word, and Text.
Section specific home pages are available: