CS422S: Operating Systems Organization (Spring 2001)
- Department of Computer Science
- School of Engineering and Applied Science
- Washington University in St. Louis
Instructor
- Fred Kuhns
- Email: fredk at cse dot wustl dot edu
Office Hours: Tuesday and Thursday 4:00 to 5:00, Bryan 504
Graders
- Dante Cannarozzi,
- Email: djc2@cec.wustl.edu
Office Hours: Sunday 4:00 - 6:00 PM, Lopata 408 (Graders Office), or by appointment through e-mail.
- Matthew Hampton,
- Email: mph2@cs.wustl.edu
Office Hours: Monday 4:00 - 6:00 PM, Lopata 408 (Graders Office), or by appointment through e-mail.
- William (Russ) Harvey,
- Email: wrh1@cec.wustl.edu
Office Hours: Tuesday 5:00 - 7:00 PM, Lopata 408 (Graders Office), or by appointment through e-mail.
- Evan Keibler,
- Email: emk1@cec.wustl.edu
Office Hours: Wednesday 5:00 - 7:00 PM, Lopata 408 (Graders Office), or by appointment through e-mail.
- Greg Kinasewitz ,
- Email: gtk1@cec.wustl.edu
Office Hours: Wednesday 6:00 - 8:00 PM, Lopata 408 (Graders Office), or by appointment through e-mail.
Locations
- Classroom -- Cupples II Room 217, Tue/Thu from 2:30-4:00pm
- CS422 Newsgroup and
newsgroup archives
- Final exam, Tuesday, May 8, 2001, Cupples II Rm 217, 10:30AM - 12:30PM
Course Description
Exploration of operating systems as managers of shared local and remote
resources. Using UNIX and Linux as conceptual and experimental frameworks,
students study algorithms and data structures that support essential
operating systems services. Concepts are reinforced through programming
exercises and comparative studies. Topics include: time sharing and real-time
scheduling of processes and threads, networking, memory management, virtual
memory, device management, concurrent programming and file system organization.
Prerequisites
Notes and Reference Materials
- Course Syllabus (PS or PDF)
- CS 422 Spring 2000 Web Page
Texts
Required:
- Operating System, Fourth Edition, by William Stallings
Also Useful:
- Operating Systems
- Modern Operating Systems, Andrew Tanenbaum, Prentice Hall, 1992.
- Distributed Operating Systems, Andrew Tanenbaum, Prentice Hall, 1994.
- Operating System Concepts, 4th edition, Silberschatz and Galvin,
Addison Wesley, 1994.
- Advanced Concepts in Operating Systems, Mukesh Singhal,
Niranjan G. Shivaratri, McGraw Hill, 1994.
- UNIX Internals: The New Frontiers, Uresh Vahalia, Prentice Hall, 1996.
- The Design and Implementation of the 4.4 BSD Operating System,
M.K. McKusick and K. Bostic and M.J. Karels and J.S. Quarterman,
Addison-Wesley, 1996.
- The Design and Implementation of the 4.3 BSD UNIX Operating System,
S. J. Leffler and M.K. McKusick and M.J. Karels and J.S. Quarterman,
Addison-Wesley, 1989.
- The Design of the UNIX Operating System, Maurice J. Bach,
Prentice Hall, 1986.
- Inside Windows NT, 2nd edition, David Solomon, Microsoft Press, 1993.
- Programming Systems
- Advanced Programming in the UNIX Environment, W. Richard Stevens,
Addison Wesley, 1992.
- UNIX Network Programming, 2nd edition, W. Richard Stevens,
Prentice Hall, 1998.
- UNIX System V Network Programming, Steve Rago, Addison-Wesley, 1993.
- C and C++ Programming
- The C++ Primer: Second Edition, Stan Lippman, Addison-Wesley, 1991.
- The C++ Programming Language: Second Edition, Bjarne Stroustrup,
Addison-Wesley, 1991.
- Effective C++, Scott Meyers, Addison-Wesley, 1992.
- The C Programming Language, 2nd edition, Kernighan and Ritchie,
Prentice Hall, 1991.
Grading
The relative weighting of the components of the grades is:
- Exams - 40%
- Programming Assignments - 40%
- Homework, Quizes and Class participation - 20%
Exams
There will be two exams: a mid-term and a final. Each exam will be worth
20% of your grade. Material tested on the final exam will be comprehensive.
Programming Projects
There will be 4-6 programming projects. Three of the assignments
(called projects below) will involve substantial programming. Students
are assumed to be competent in C or C++ and familiar with the UNIX operating
system.
The general criteria for the grading of the programs is given below:
- Project Design 40%
- Are all conditions covered (errors, operations specified in assignment)?
- Have synchronization and process/thread scheduling issues been addressed?
- Have Proper measurement and/or data collection techniques been used?
- Does the overall design and implementation demonstrate an understanding
of the underlying issues?
- Does the solution demonstrate insight or have novel approaches been used?
- Structure 15%
- Is the software logically structured?
- Is it rational and is there a sufficient use of comments?
- Have potential maintainability or portability issues been addressed?
- Documentation - 25%
- Is there a supplied README file and any other files required by the project?
- Does the analysis address all required issues and is it insightful?
- Is the documentation logically structured and is it understandable?
- Have instructions been followed?
- Program Operation - 20%
- Does the program work or does it terminate in an error?
- Does it accept the proper parameters?
- Are the results displayed properly?
- Are the results correct or reasonable?
Homeworks, Quizes, and Class Attendance
There will be weekly homework assignments from the required text and an
occasional short graded quiz. The quizes can be announced or unannounced.
Therefore, it is essential that you attend class in order to prepare for
the quizes and exams. There will be no makeup quizes.
Late Submissions
Homework and projects may be submitted up to three days late. However,
for each day late 5 points will be deducted. After the third
day the homework or project will not be accepted.
Occasionally, in special situations, arrangements for a late submission
can be made if requested well in advance of the due date.
Syllabus (Subject to Change)
| Date |
Class # |
Topic |
Text Chapter |
| 1/16 | 1 |
Introduction and Computer Architecture Review
PPT,
PS, PDF |
1 |
| 1/18 | 2 |
Computer Architecture Review and OS Overview
PPT,
PS, PDF |
1 & 2 |
| 1/23 | 3 |
Continue Overview - The Process and Kernel
PS, PDF |
2 |
| 1/25 | 4 |
Processes: Lecture
PS, PDF |
3 |
| 1/30 | 5 |
Finish Processes Lecture and Start IPC
PS, PDF |
3 |
| 2/1 | 6 |
Finish Interprocess Communication |
Class Notes |
| 2/6 | 7 |
Threads, SMP and Microkernels
PS, PDF |
4 |
| 2/8 | 8 |
CPU Scheduling
PPT,
PS, PDF |
9 |
| 2/13 | 9 |
Real-Time and Multiprocessor Scheduling
PS, PDF |
10 |
| 2/15 | 10 |
Finish RT Scheduling and Begin Process Synchronization
PS, PDF |
10 and 5 |
| 2/20 | 11 |
Synchronization continued (Use lecture notes from previous class) |
5 |
| 2/22 | 12 |
Synchronization continued |
5 |
| 2/27 | 13 |
Deadlocks
PS,
PDF
|
6 |
| 3/1 | 14 |
Deadlock
| 6 |
| 3/6 | 15 |
Midterm Review Bring Book |
7 |
| 3/8 | 16 |
Midterm Exam |
N/A |
| 3/13 - 3/15 | No Class |
Spring Break |
N/A |
| 3/20 | 17 |
Memory Management
PS,
PDF
PPT
|
7 |
| 3/22 | 18 |
Virtual Memory
PS, PDF |
8 |
| 3/27 | 19 |
Virtual Memory
PS, PDF |
8 |
| 3/29 | 20 |
File Systems
PDF |
12 |
| 4/3 | 21 |
File Systems |
12 |
| 4/5 | 22 |
I/O Systems
PS, PDF |
11 |
| 4/10 | 23 |
Mass-Storage Structure
PDF |
12 |
| 4/12 | 24 |
Distributed Processing
PDF |
13 |
|
4/17 | 25 |
Distributed Processing and Process Management
PDF |
13 and 14 |
| 4/19 | 26 |
Distributed Process Management, Continued |
14 and Class Notes |
| 4/24 | 27 |
Distributed Systems, Class Notes
PDF |
Class Notes |
| 4/26 | 28 |
Review notes |
|
| Tuesday, May 8, 2001 | 29 |
Final exam, Cupples II Rm 217, 10:30AM - 12:30PM |
N/A |
Homework Assignments
Send text file with questions and answers to cs422@cec.wustl.edu or make
other arrangements with the graders. Below are listed the homework assignments
and due dates.
- Assignment 1 - Operating Systems Overview.
Chapter 2 Problems 2.1, 2.2, 2.3, 2.4 and 2.5.
Answers.
Assignments Due date: No later than Midnight on Thursday, 1 Feb.
cat my_homework1 | Mail -s 'Submit: Homework1' cs422@cec.wustl.edu
- Assignment 2 - Processes, Threads and Scheduling
Chapter 3 Problems - 3.4 and 3.10
Chapter 4 Problems - 4.1, 4.4 and 4.7
Chapter 9 Problems - 9.5 and 9.10
Assignments Due date: No later than Midnight on Thursday, 15 Feb.
cat my_homework2 | Mail -s 'Submit: Homework2' cs422@cec.wustl.edu
- Assignment 3 - Multiprocessor and Real-time Scheduling
Chapter 10 Problems - 10.3
Chapter 10 Review Questions: - 10.2
Assignments Due date: No later than Midnight on Thursday, 22 Feb.
cat my_homework3 | Mail -s 'Submit: Homework3' cs422@cec.wustl.edu
- Assignment 4 - Synchronization.
Chapter 5 Problems: 5.3, 5.5 and 5.8.
For problem number 5.8, use the following code:
0 global integer arrays q[N], turn[N-1];
Pi:
1 while (true) { ...
2 for j = 1 ... N - 1 do {
3 q[i] = j
4 turn[j] = i
5 REDO:
6 for k = 1 ... N, k != i {
7 if ((q[k] >= j) and (turn[j] == i)) goto REDO
8 }
9 }
10 q[i] = N;
11 Critical Section for Process i (CSi)
12 q[i] = 0;
13 }
There are a total of N concurrent processes with the ith
process denoted by Pi. The arrays q[n] and turn[n-1] are
accessible by all process. The elements of q and turn are initialized
to zero (0).
Each process has it's own local copies of the integers j and k. Within the
pseudocode the value i represents the Pi process. In other words,
were we say:
Pi:
...
for k = 1 ... N, k != i {
This is to be interpreted as: in Process i, k will take on all values between 1
and N (inclusive) with the exception of i. For example if N = 10 and i = 3 (P3),
then k will take on the consecutive values {1, 2, 4, 5, 6, 7, 8, 9, 10}.
Keep in mind that each process may be interrupted any number of times or we could
even implement using a multiprocessor system. No constraints are placed on ordering
with the exception that the load and store commands are assumed to be atomic.
Complete the problem as written in the book and also show that if we assume each process "continually
tries" to obtain the lock then there will be linear waiting. In order for a
process to continually try we require the OS scheduler to ensure that each process is able
to obtain a fair percentage of the CPU time, although we do not define what fair means.
Assignments Due date: No later than Midnight on Saturday, 3 March
cat my_homework4 | Mail -s 'Submit: Homework4' cs422@cec.wustl.edu
- Assignment 5 - File Management
Chapter 12 Problems: 12.3 and 12.7
Assignments Due date: No later than Midnight on Thursday, 12 April.
cat my_homework5 | Mail -s 'Submit: Homework5' cs422@cec.wustl.edu
- Assignment 6 - I/O
Chapter 11 Problems: 11.6 and 11.9
Assignments Due date: No later than Midnight on Thursday, 19 April.
cat my_homework6 | Mail -s 'Submit: Homework6' cs422@cec.wustl.edu
- Assignment 7 - Disk I/O
Answer the following question:
Assume you have a fast-wide SCSI-II disk that operates at 20MB/sec. The
particulars are 7200 RPM, 512 B/sector, 160 sectors/track, 7000 cylinders, 20
tracks/cylinder and an average seek time of 8msec. Estimate the I/O operations per second
and the effective transfer rate for a random-access workload that reads individual
sectors that are scattered across the disk.
Assignments Due date: No later than Midnight on Thursday, 26 April.
cat my_homework7 | Mail -s 'Submit: Homework7' cs422@cec.wustl.edu
Programming Assignments
- Process Creation and IPC Usage
Due: No Later than midnight Sunday, 11 February 2001.
For a look at my solution see lab1.c, compile
using the command
gcc -o lab1 lab1.c
In this example I tried to use several different constructs in C
to introduce you to the language and system programming. I have used MACROs,
inlined functions, structs, enums, function pointers and different
system calls. I have also replaced pause() with sigsuspend()
which removes one of the race conditions you ran into.
- Process Performance Measurements
Due: 27 Feb. 2001 .
For a look at my solution see Lab2, compile
using the command
make all
- Clock routine and callout queue processing
(i.e. timer queues) Due: March 25, 2001 (3 weeks).
Here is an example of how to`use pthread mutexes and condition variables:
(Example Code)
- Logging facility using memory mapped files.
Due: Midnight April 29, 2001 (2 weeks).
Extra Credit Assignment
For extra credit you may write a report about either a specific
operating system or some aspect of an operating system. Suggested
operating systems include QNX, LynxOS, VxWorks (By WindRiver), PalmOS,
Mach, NetBSD, RT-Linux, Chorus, OSX, Windows CE or one of your choice.
There are plenty of resources and documentation available on the Web
for all the OSes I mentioned above.
Example OS features include virtual memory, page replacement algorithms,
disk scheduling algorithms, real-time scheduling, VNODE architecture,
SVR4 Streams, BSD sockets, NT kernel objects, W2000 scheduling,
or one of your choosing. There are plenty of references in your book
for all of these topics.
Due Date: Same as Project Number 4, Midnight April 29, 2001
Requirements:
Your report must be between 4 and 5 pages in length (single space lines)
and include the following headings:
- Abstract - one paragraph providing an overview of your report.
- Introduction - This should tell me what the report is about and why I care.
- Body - This must be a technical discussion of the topic. If you are
reporting on a specific operating system then do your best to anser the
following questions (if you could not find sufficient info then indicate so):
- Processes management - does it support threads, if so user or kernel or both?
- Memory Management - does it support virutal memory, is the memory paged or segmented or both?
- Secondary storage management - Is memory backed by persistent storage?
- I/O management - Is I/O buffered?
- File management - Can you create and manipulate files?
- Protection system - Is access to the system controlled?
- Networking subsystem - Can the target platform communicate over a network?
- User Interface - How do uses interact with the system?
If you are reporting on a specific OS mechanism or algorithm then describe it
in detail. Provide a comparison to alternative approaches.
- Conclusion - What is your opinion about your selected topic. Is it a "good" approach
or environment? Are there environmental or platform specific issues?