CPSC 331 Operating Systems Fall 2005

CPSC 331 Course Information

An operating system is an essential part of a computer system - every computer system comes with one, whether it be Windows XP, Mac OS X, Linux, or something else. The operating system is what sits between the computer's users and its hardware, providing a convenient interface by which the users can access the hardware as well as managing the use of that hardware. Given this role, the operating system is perhaps the most critical piece of software running on a computer - if it doesn't work correctly and reliability, the computer may well be unusable.

The goal of this course is to examine what goes into constructing a modern operating system. Three main components of an operating system will be studied: process management (including multiprogramming, multithreading, and synchronization issues), memory management, and storage management (including file-system management). Both theoretical and practical aspects of these topics will be emphasized; the latter through a series of programming projects in which students will construct major portions of a simple operating system.

This is a programming course, and it should be expected that a fair amount of time will be spent designing and implementing code.


Instructor

Stina Bridgeman
bridgeman@hws.edu
Lansing 312, x3614


Office Hours

M 2:30-3:45pm, T 3:30-5pm, R 10:15-11:30am, F 1:30-2:30pm
or by appointment (schedule)


Class Hours and Meeting Place

Lecture/discussion MWF 12:20-1:15pm, Lansing 300
Some meetings may be in the Lansing 310 computer lab; these will be announced in advance.


Course Web Page

http://math.hws.edu/~bridgeman/courses/331/f05/
You are expected to regularly consult the course web page for announcements, assignments, and most handouts.


Text

Operating System Concepts, 7th edition
Silberschatz, Galvin, Gagne
Wiley, 2005
Note: There are many editions of this text and the 7th edition is a new edition, so make sure you get the right version!
Note #2: The authors' web page includes errata - check this out and make the appropriate changes.

Additional material will be handed out or posted on the course webpage.


Prerequisites

CPSC 225
CPSC 229 is recommended
CPSC 226 is useful but not required


Rationale

This course, like the other 300- and 400-level computer science courses, explores a particular subdiscipline of computer science. The study of operating systems reveals the details of software that you use every time you turn on a computer, but which you probably take for granted and hardly give a second thought. Since operating systems are so fundamental to the functioning of a computer system, it is important for a well-rounded computer scientist to have some understanding and appreciation of the tasks and complexities involved in creating modern operating systems.


Aims

By the end of the course, the successful student should be able to:

  • describe and discuss the design and implementation of the process management, memory management, and storage management functions of a modern operating system
  • explain, compare, and contrast how particular operating systems (such as Windows XP and Linux) implement these functions
  • appreciate the complexity and details of a modern operating system


Course Content Overview

After a brief introduction to operating systems and their history, the course will focus on three major services that modern operating systems provide: process management, memory management, and storage management. Time permitting, additional topics such as protection and security will be covered. The objectives listed below paint - in broad strokes - what the successful student should be able to do at the end of each section.

Process Management: The process - a term used to describe an executing program - is the fundamental unit of work in a computer system. As a result, supporting the creation, termination, scheduling, communication, and synchronization of processes is at the heart of an operating system's job.

Objectives:

  • describe the features of processes, including the definition of a process, scheduling, creation and termination, and interprocess communication
  • describe the features of threads, including the definition of a thread, applications and benefits of threads, multithreading models, and threading issues
  • write C programs which manipulate processes and threads and use shared memory under Linux and Pthreads
  • explain, evaluate, and discuss the performance of various CPU scheduling algorithms
  • describe and discuss hardware and software solutions for the critical section problem
  • use synchronization primitives to correctly solve problems requiring synchronization
  • characterize when deadlocks can occur
  • describe and discuss techniques for preventing deadlocks, and alternatives to prevention

Memory Management: Since the CPU cannot access disks and other secondary storage directly, every process needs main memory in order to run. The operating system is responsible for handling memory allocation and deallocation, keeping track of how main memory is allocated, and moving processes in and out of main memory as needed.

Objectives:

  • describe and discuss techniques for memory management, including the necessary hardware support
  • define "virtual memory" and explain its benefits
  • describe and discuss demand paging
  • describe and discuss various page-replacement algorithms and various methods of allocating page frames

Storage Management: Secondary storage (such as hard disks) is necessary to provide large-capacity non-volatile storage. The operating system makes the computer more convenient for users by hiding the physical details of the myriad of types of storage devices behind a single abstraction: the concept of a file. The operating system is then responsible for supporting the logical file system (including providing mechanisms for creating, deleting, and modifying files and directories) and for mapping the logical operations onto the physical storage devices.

Objectives:

  • explain the function of file systems and describe their interfaces
  • describe and discuss design choices for access methods and directory structures
  • describe and discuss the implementation of local file systems and directory structures
  • describe and discuss block allocation and free-space management techniques

Assignments and Evaluation

Exams: There will be a midterm exam with both an in-class and a take-home component, and there will be a take-home final exam. More information about the exams will be provided closer to the exam dates.

Homework: There will often be one or two homework problems assigned in class, due at the beginning of the next class. Come to class on the due date prepared to discuss the homework. Problems will be announced in class and posted on the course webpage. Homeworks must be legibly written - typing is preferred, but neatly handwritten assignments are acceptable. The two lowest individual problem scores will be dropped when computing the homework component of the final grade. See the course policies for the late policy and collaboration policy for homeworks.

Projects: A core element of the course will be programming projects, in which you'll get hands-on experience with many of the theoretical concepts covered by implementing major components of an operating system. Unless otherwise noted, 50% of the grade on each project will be based on design and the other 50% on the implementation. This is to emphasize the importance of developing a good design before starting the implementation, and to reward a good design even if the implementation isn't completely in place. See the course policies for the late policy and collaboration policy for projects.

Final Grades: Final grades in this course will be computed as follows:

  • Homework: 25%
  • Projects: 50%
  • Midterm exam: 10%
  • Final exam: 15%

On-time attendance and class participation (see the course policies) are expected, though they are not formally factored into your final grade. However, missing class - for any reason - often results in lower grades because important material was missed. Similarly, not participating in class even if you are physically present may mean that you aren't actively following the material and thus may be missing more sophisticated or subtle points. Whether or not your grade is impacted for these reasons is up to you - it is your responsibility to get notes from another student or otherwise catch up on missed material. Also note that class participation and the number of unexecused absences are considered when deciding whether or not to round up a final grade which is just below a grade-level cutoff. See the course policies for the definition of unexcused and excused absences.

There are no officially scheduled extra credit assignments - do your best on each regular assignment as it comes along, rather than blowing something off with the idea of making up for it later with extra credit. That being said, there may be opportunities for extra credit on some assignments. Extra credit problems, if present, are likely to be longer, harder, more sophisticated, and/or trickier than the regular problems. You should view extra credit as a bonus for going deeper into the material rather than as a safety net.


Valid HTML 4.01!