General Information

Instructor

Matt Bishop Office hours: MWF 11:15 AM - 12:15 PM, or by appointment
Office: 3059 Engineering Unit II Email: bishop@cs.ucdavis.edu
Phone: (530) 752-8060 WWW: http://seclab.cs.ucdavis.edu/~bishop

Teaching Assistants

Patrick LeBlanc (leblanc@cs.ucdavis.edu) and Tom Walcott (walcott@cs.ucdavis.edu).

Contacting Us

You can contact me, or the TAs, by sending email to cs150@csif.cs.ucdavis.edu. Please don't send us email individually. That way, any of three people will be able to see it, so you should get a quicker answer. If we think the question is of general interest, we will ask you to post it to the news group and we will respond there.

Note: Please make the first words of the subject be "ECS 150" to help us see it quickly!

Lectures and Discussion Sections

Section 1: TuTh 1:40PM-3:00PM in 223 Olson; discussion is F 4:10PM-5:00PM in 205 Olson
Section 2: MWF 10:00AM-10:50AM in 1130 Hart; discussion is F 5:10PM-6:00PM in 205 Olson

Course Outline

Basic concepts of operating systems and system programming. Processes and interprocess communication/synchronization. Virtual memory, program loading and linking. File and I/O subsystems. Utility programs. Study of a real operating system.

Course Goals

Some goals we hope you achieve:

  1. understand the basic concepts of operating systems, including file and process management, process scheduling and synchronization, memory management, deadlock, and protection in a multiprogramming system;
  2. learn about the practical aspects of operating system design and implementation;
  3. apply these concepts to a small operating system (MINIX 2.0);
  4. understand what system calls are and how to use them; and
  5. gain experience in systems programming.

Course Prerequisites

We expect you to be comfortable with the following concepts and able to do the following:

  1. Assembly language programming, as covered in ECS 50;
  2. Data structures, such as queues, stacks, lists, as covered in ECS 110;
  3. Basics of computer architecture, especially interrupts and memory management, as covered in ECS 154A; and
  4. The C programming language (you will need to use C, not C++).
The official prerequisites for this class are ECS 40 and either ECS 154A or EEC 70. If you do not have the prerequisites for this course, you will be dropped from it to make room for others who do have the prerequisites.

Text

Andrew S. Tanenbaum and Albert S. Woodhull, Operating Systems: Design and Implementation, Second Edition, Prentice-Hall, Inc., Upper Saddle River, NJ 07458 (1997).

Course Web Page, Handouts, and Newsgroup

The web page http://ecs150.ucdavis.edu contains links to course handouts. Information about this class, homework assignments, office hours, and so forth, will be posted to the web page. Announcements, information about assignments, and other important messages will be posted to the ucd.class.ecs150 newsgroup. Read this newsgroup daily, especially near the time assignments are due. You are responsible for everything posted. This newsgroup is not for discussion about the class, for but information from the instructor or teaching assistants to you.

If you want to post things about the class, please use the discussion newsgroup ucd.class.ecs150.d Discussing something in this group is perfectly fair!

Homework Assignments

There will be several homework assignments. The due date will be on each assignment. Because we must cover so much material, it is imperative you keep up with the class and labs. We will not accept any late assignments.

The handout All About Homework Assignments has more information on how to turn in homework and what we expect. Please submit your homework electronically as described in that handout; we will not accept handwritten assignments. Also, please think your answers through before writing them down in final form. A request for a discussion should be treated as an essay question, with a main theme and arguments for and against the answer. It is fair to present the factors that affect your answer; it is not acceptable to begin by giving one answer in the introduction and a different answer in the conclusion! (Yes, you'll lose points.) Always show your work; if you simply write down a correct answer and do not show how you got that answer, you will not get any credit (even if your answer is right).

Laboratory Assignments

There will be several laboratory assignments. The handout All About Laboratory Assignments has information on how to turn in the lab assignments, how to get them graded, and what we expect from you.

Grading

20%Homework     30%Labs     25%Midterm     25%Final

Extra Credit

Some of the assignments may include suggestions for extra credit. Extra credit scores are kept separate from regular scores. If you end up on a borderline between two grades at the end of the course, extra credit will count in your favor. However, failure to do extra credit will never count against you, since grades are assigned on the basis of regular scores. You should do extra credit if you find it interesting and think it might teach you something. But it never pays to skimp on the regular assignment in order to do extra credit.

Academic Integrity

Please see the Winter 2000 Class Schedule and Room Directory for a general discussion of this. In particular:

A good analogy between appropriate discussion and inappropriate collaboration is the following: you and a fellow student work for competing software companies developing products to meet a given specification. You and your competitor might choose to discuss product specifications and general techniques employed in your products, but you certainly would not discuss or exchange proprietary information revealing details of your products. Ask the instructor for clarification beforehand if the above rules are not clear.

Syllabus

Week #1. January 5-7, 2000

Topics: Introduction, history and organization of operating systems; the kernel; virtual machines
Reading: Tanenbaum §1.1-1.5
Discussion Section: System calls for files and directories

Week #2. January 10-14, 2000

Topics: Processes, concurrency; the critical section problem; software and hardware solutions; semaphores
Reading: Tanenbaum §2.2.2-2.2.5, 2.3
Discussion Section: System calls for protection and processes

Week #3. January 17-21, 2000

Topics: Monitors, eventcounters and sequencers, IPC constructs
Reading: Tanenbaum §2.2.6-2.2.7, 2.2.9
Discussion Section: System calls for interprocess communication, including signals

Week #4. January 24-28, 2000

Topics: Process Scheduling
Reading: Tanenbaum §2.4-2.6
Discussion Section: MINIX process structure

Week #5. January 31-February 4, 2000

Topics: Input and Output
Reading: Tanenbaum §3.1-3.2, 3.4, 3.5, 3.6.1, 3.7-3.9
Discussion Section: Review for midterm

Week #6. February 7-February 11, 2000

Topics: Memory management
Reading: Tanenbaum §4.1-4.3, 4.6
Discussion Section: MINIX I/O
Midterm exam is this week

Week #7. February 14-February 18, 2000

Topics: More memory management
Reading: Tanenbaum §4.4-4.5, 4.7-4.8
Discussion Section: MINIX memory management

Week #8. February 21-February 25, 2000

Topics: File system organization and implementation
Reading: Tanenbaum §5.1-5.3
Discussion Section: MINIX file system

Week #9. February 28-March 3, 2000

Topics: Deadlock models, principles, practise
Reading: Tanenbaum §3.3
Discussion Section: Some Example Problems and Solutions

Week #10. March 6-10, 2000

Topics: Security and protection mechanisms
Reading: Tanenbaum §5.5
Discussion Section: Review for final

Lectures

Because I teach to the students, and not to the syllabus, these dates and topics are tentative and subject to change without warning. In particular, if I don't discuss something you're interested in, ask about it! I may very well add it or modify what I'm covering to include it.

Discussion Sections

We expect the discussion sections to amplify the material covered in class by relating it to MINIX and the UNIX operating systems. In the lectures, I will discuss both MINIX and UNIX (as well as other systems), but I'll cover the application of the principles to those systems. The teaching assistants will go into much more depth about MINIX in the discussion sections.

However, the above discussion section topics are tentative and subject to change as we see fit. Regardless of what is listed, all discussion sections have a few ground rules:


All About Homework Assignments

This handout describes some general thoughts and techniques for doing homework, as well as what is required, how to submit it, how late homeworks are handled, and other administrative matters.

Turning In Homework

All homework is due at 11:59PM on the due date, unless noted otherwise on the assignment. (This way, you have no incentive to skip the class while finishing your homework at the last minute!) These will be graded and returned to you as quickly as possible; we'll try for three class periods, but can't guarantee it.

You must turn in either an ASCII or a PostScript version of your answers (you can use any text processor you like to generate these). If you submit PostScript, please be sure the file will print on our department printers (use ghostscript or gs to check this; if they display it properly, it should be okay). If your file is a postscript file, choose a name that ends in ".ps"; if it is an ASCII file, please choose a name that ends in ".txt".

Turn in your written exercises electronically to UCDisk. To do this, get a credential for UCDisk (see All About UCDisk), and put your homework in a subdirectory of your UCDisk home directory called "ecs150/hand-in/hwn" where n is the homework number. Be sure the account bishop can read that directory and the files in it! We will copy the homework out, and send you a letter saying what we copied and the date of last modification of the file. (This will be used as the time of submission.) At a later time, we will email your grade and any comments to your UC Davis login (not your CSIF login!).

Doing Written Exercises

When you are asked to analyze something, or explain something, please be complete, and show your work (including any commands you give, and their output, to show how you did the problem); otherwise, even if you get the right answer, you will get ZERO points. Think your answer through and do a rough draft. Write clearly and cogently. If the question asks for an opinion, state your opinion clearly, justify it, and don't ramble. Answers which start, "My opinion is yes ..." and conclude with "... on the other hand it could equally well be no" won't get much credit. Similarly, if you are asked to "prove" something, you must give a mathematical proof (formal or informal). Proof by similarity ("it works in this case, and in another case, so it must be true for all cases!"), proof by assertion ("it sounds right, therefore it is right!"), or proof by citation ("our professor said it in class, so it's right!") are all unacceptable.

Asking For Help

We do not mind being asked for help; indeed, we welcome it because it helps us know what the students are finding difficult or confusing, and sometimes a few words about the problem in class will clarify the assignment immensely. Your questions may also point out ambiguities that we didn't think of, so the more questions you ask, the better for everyone!

We do mind being asked for help before you have tried to think the problem through; the classic objectionable question (this really happened) occurred on a programming assignment in which the class was given a buggy program. The assignment said the program did not work, and the homework was to debug it and make it work. Within 10 minutes of the end of the class during which the assignment was given out, the instructor got this request for help: "The program doesn't run. What do I do now?"

So, before asking for help (except for questions about what the problem is asking), please be sure that you have:

When you come to us, or send us a note, asking for help, please describe whatever you have done to solve the problem, because the first question we will ask you is "What have you tried to solve the problem?" This isn't because we think you're wasting our time; it's because understanding how you have tried to solve the problem will help us figure out exactly what your difficulty is and what we can do to help you. Remember, we will do everything we can to avoid solving the problem for you; when we give you help, our goal is to help you solve the problem yourself

Don't Delay!

We must emphasize the importance of taking time to think through, outline, and draft your answer, thoroughly. More points are lost through unclear organization, or superficial answers, than anything else. So do think both your answer and your expression of the answer through, and -- as always -- try to find the simplest way to solve the problem (within the limits given in the assignment, of course)!

Do not leave assignments for the last minute. The assignments are non-trivial and will require significant time before you write your answers for submission. When we decide on the due dates, we assume you will spend significant amounts of time solving (at least some) of the problems. If you choose not to do this, you will have difficulty finishing the assignments on time.

Grades

Your grades will be mailed to your CSIF account when the homework assignment is graded. Please be sure that account will forward mail to wherever you want to see the grade. If the letter bounces, we will not try to figure out why. (With 120 people - at least! - in this class, it's simply not practical; the graders will be too busy.)

Late Homework

Unless the assignment says otherwise, we won't accept them. The submission directory will be disabled at the due time, so you won't even be able to submit late homeworks. Requests for exceptions will be handled on a case-by-case basis (in other words, ask).

Grade Appeals

If you feel that there is an error in grading, please come see me or the TA and we'll look over it (and possibly talk with you about it). However, don't dally; any such request must be made within one week of when the grades were made available. After that, we won't change your grade.

Important Note

Currently we have a lone grader for both sections. We are trying to hire two more, but if we cannot, we will only grade a portion of the homework, and scale the scores accordingly. (For example, if the questions we grade have a total point value of 30 points, we will treat the homework as though it were 30 points total.) We will not announce beforehand which questions we will grade, so you still will need to do all questions. We hope it won't come to this, but just in case, we wanted to warn you in advance.


All About Laboratory Assignments

There will be some laboratory assignments. The first will involve the use of the system calls of MINIX to write some simple C programs that could be part of a shell. For this class the shell is not considered part of the operating system. The remaining assignments require minor modifications to MINIX to improve its performance and functionality, or just to play with its code. This handout describes some general thoughts and techniques for doing the labs, as well as what is required, how to submit it, how late labs are handled, and other administrative matters.

The ECS 150 Pentium Laboratory is located in 083 Engineering Unit II (in the basement). Its hours have not yet been set, but it generally will be open for the same hours as the CSIF.

Lab Partners

You may do these assignments individually, but we prefer you to work in teams of two to three. You will find this helpful, too.If you work in a group, then you should expect to stay with that group for the duration of the quarter, unless the other member or members drop the class or go on strike.

Turning In Laboratory Assignments

Lab assignments will be due by 5 PM on the due date, unless noted otherwise on the assignment. You must demonstrate the solution to the grader (who will be one of the teachings assistant).

Turn in lab assignments by copying all new and changed source code files for the assignment to a floppy diskette. The diskette is to be labeled with:

If you turn in a diskette that is missing files or has the wrong files for the assignment, you can substitute the correct ones with a 30% penalty. I really hate doing this, but when it was not done, individuals abused substitution policies that were more lenient. Then put the floppy into the homework box located on the second floor.

You also must sign up for a time slot to demonstrate your solution(s) to the graders. Sign-up sheets for time slots will be posted 2-3 days before each assignment is due. We encourage you to finish your assignments early. The TA will have significant office hours in the lab, and if you demonstrate your solutions before the due date (all problems must be complete to demonstrate early), then you will have the opportunity to fix any bugs found during the demonstration.

If you did the assignment as a group, then all members of the group must be present for the demonstration. Be sure that all members of the group are familiar with all code written and changed, because the grade for each assignment depends in part on the answers given to questions the grader asks about the code and the reasons for your approach. It is probable that you will fail a lab if you don't understand the solution, even though other members of that group pass

Important: Please remember that a TA cannot be present in the laboratory for all hours in which the lab is open (these hours are usually 10:00 AM to midnight, Monday through Friday. As the due date for a lab approaches, the TAs are likely to be very busy; you will find them much more sympathetic if you approach them with questions well before a lab is due.

Doing the Laboratory Assignments

You may do the assignments on the Pentium computers in the lab or on your own PC. The books come with MINIX on a CD. If you do the assignments on a PC, then you may bring your PC to the lab to demonstrate your solutions or you may demonstrate them on a PC we will have in the lab for that purpose. However, if you decide to do the lab assignments on a PC then you are responsible for ensuring that your solution works on the machine used for the demonstration! There are many different PC configurations and corresponding versions of MINIX. Therefore if you are planning to use the grading PC for your demonstration, test your solutions on it to ensure that there are no compatibility problems before turning them in.

Asking For Help

Everything in All About Homework Assignments applies here. Please try to debug problems yourself before seeking help; you will learn more that way.

Don't Delay!

We must emphasize the importance of taking time to design your program, or understand the code and the modifications you must make, thoroughly. More programming problems arise from improper design than anything else, and the few hours you spend on design will be amply repaid by shorter coding and debugging phases. So do think the design and interfaces through, and -- as always -- try to find the simplest way to do the assignment (within the limits given in the assignment, of course)!

Do not leave assignments for the last minute. The assignments are non-trivial and will require significant design time before you start programming and debugging. When we decide on the due dates, we assume you will spend significant amounts of time on design as well as coding and debugging. If you choose not to do this, you will have difficulty finishing the assignments on time.

Some Notes

Please don't skip laboratory assignments. This will certainly bias the professor (me) against you1. It also will hurt your grade substantially (check the weightings of the grades above to verify this). It will also hurt your understanding of how real operating systems work. You have the opportunity to work with a little, but fully functioning, operating system. Many computer scientists learned operating systems by reading the code to UNIX Version 6, which was substantially smaller than current versions of UNIX. MINIX gives you essentially the same opportunity. This experience will be invaluable to you. It will also impress interviewers when you go for interviews, and will help you immeasurably if you ever have to work on a larger operating system (like Linux!)

I'll let you in on a secret that faculty members who taught this class before told me. Except for the pain in dealing with the MINIX development environment (which is impoverished at best), the labs are really easy. Most students get perfect grades. But don't tell anyone else ...

Late Labs

We will accept late lab assignments up to one day after the due date and time, and will deduct 20% of the value of the assignment (so if the lab assignment is worth 100 points, you lose 20 points regardless of your score; if it is worth 200 points, you lose 40 points). Requests for exceptions will be handled on a case-by-case basis (in other words, ask).

Grade Appeals

If you feel that there is an error in grading, please come see me or the TA and we'll look over it (and possibly talk with you about it). However, don't dally; any such request must be made within one week of grading. After that, we won't change your grade.


All About UCDisk

This term, we will be experimenting with the University's shared file system, called UCDisk. All homework is to be submitted through this shared file system. This is a brief introduction to using it.

What Is UCDisk?

UCDisk is a large shared disk facility built on AFS (a descendent of the Andrew File System). It provides fine-grained access control, which will play a part in how you will use UCDisk. It also is accessbile from a large number of places on campus, including from the isun systems and most Windows labs. If you have a home computer running Windows 95 or 98, and you connect over the Internet (either from another ISP or through the campus modem bank using PPP), you can mount the file system onto your home machine.

Unfortunately, you cannot yet connect from the CSIF. If this experiment works out well, we will try to make it available next term. But currently AFS software is available to the University only for SGI systems (although a native Linux client is being written).

Accessing UCDisk

To access UCDisk, you first need a campuswide login (called your "UCD login") and a password. The authentication protocol Kerberos is used to authenticate you, which in turn controls what you can access. This means your password is never sent over the network (in the clear or enciphered). If you do not have a UCD login, telnet to the host mothra.ucdavis.edu, log in as services (no password needed) and choose N from the menu.

Your "UCDisk home directory" has your UCD login as its name. For example, my UCDisk home direcory is called "bishop". DCAS has created UCDisk home directories for everyone in the class who has a UCD login. If you do not have a UCD login, please get one and email me when it is selected, and I'll ask DCAS to make you a directory.

Once you have a directory, you can access it through Windows (any of 95, 98, or NT will work), the isuns, or the ECE UNIX computer systems. (Sorry, you can't do it through a Mac. The Mac doesn't handle the right versions of Kerberos.) The web page http://ucdisk.ucdavis.edu describes how to do this from all systems; go to the "Getting Started" link. Briefly, from a UNIX system, if your UCD login is ucdlogin, your UCDisk home directory is "/afs/dcas.ucdavis.edu/pilot/users/ucdlogin". From a Windows system, perform the network mounting as described on the web page, and your home directory will be represented by a network drive (the exact letter depends on your system setup).

UCDisk Web Page

This is an abbreviated version of the information available from http://ucdisk.ucdavis.edu. I recommend you check that web page out for more information.


Footnotes

  1. I would make penalties more dire, but I couldn't enforce any of the ones that come to mind, such as requiring you to use no system other than MS/DOS and no language other than machine language for the rest of your academic career in computer science.


Send email to cs150@csif.cs.ucdavis.edu.

Department of Computer Science
University of California at Davis
Davis, CA 95616-8562



Page last modified on 1/7/00