Table of Contents
Lectures and Homeworks
Lecture handouts and post-lecture todos are posted here.
Course Schedule
Lectures: ECEB 1002
306 N Wright St, Urbana, IL 61801
new Electrical & Computer Eng Bldg
AL1: Mon, Wed, Fri 11-11:50am
Section: Siebel Basement 0218
AD1: Thu 9:00-9:50am
AD2: Thu 10:00-10:50am
AD3: Thu 11:00-11:50am
AD4: Thu 12:00-12:50pm
AD5: Thu 1:00-1:50pm
AD6: Thu 2:00-2:50pm
AD7: Thu 3:00-3:50pm
AD8: Thu 4:00-4:50pm
AD9: Thu 5:00-5:50pm
AD0: Thu 6:00-6:50pm
You can meet the team here. (Opens in a new window)
Course Description
A computer needs an operating system to manage its resources and provide support for common functions such as accessing peripherals. There are two categories of "customers" that an operating system must support. The first category is the community of users. We have all used computers and you may recognize operating systems' functions such as creating folders (directories) and moving files around. These are examples of operating system support for users. User support is not the objective of this course. This course addresses operating system support for the second category of customers; namely, the programmers. Those are people who write code to execute on the computer. When you write a program, it may have to interact with physical hardware (memory, flash storage, screen, network, etc.). For example, you may want to get input from a keyboard or mouse, you may want to read some configuration file stored on disk, you may want to output data to a screen or printer, or you may want to access a remote server across a network. The operating system presents common interfaces for programmers to perform these functions. The operating system also provides useful abstractions such as "tasks" (also called processes), "threads", and "semaphores". You can make the computer multitask by calling the operating system interface for creating new tasks or new threads. You can make these tasks coordinate and synchronize by using operating system semaphores. You can tell the computer the order in which you want tasks to be executed, which is called a scheduling policy. Finally, you can manage computer memory by calling the operating system function for memory management. System programming refers to writing code that tasks advantage of operating system support for programmers. This course is designed to introduce you to system programming.
By the end of this course, you should be proficient at writing programs that take full advantage of operating system support. To be concrete, we need to fix an operating system and we need to choose a programming language for writing programs. We chose the C language running on a Linux/UNIX operating system (which implements the POSIX standard interface between the programmer and the OS). This pairing of C and UNIX/Linux is used heavily by software that must provide high performance and low-level control of the program's execution. Hence, this course introduces you to systems programming via the specific case of C over UNIX. By the end of the course you should be proficient with this programming environment and should be able to write non-trivial pieces of software from web server code to your own multiplayer Internet games. More specifically, after taking this course you should be able to accomplish the following:
- Identify the basic components of an operating system, describe their purpose, and explain how they function.
- Write, compile, debug, and execute C programs that correctly use system interfaces provided by UNIX (or a UNIX-like operating system).
- Be familiar with important UNIX system calls and invoke them correctly from within C programs.
- Describe the difference between programs, processes, and threads.
- Explain the meaning and purpose of process control blocks and other mechanisms that the operating system uses to implement the process and thread abstractions.
- Write, compile, debug, and execute C programs that create, manage and terminate processes and threads on UNIX.
- Define concurrency and explain the problems that may arise because of concurrent execution of multiple processes or threads. Explain how these problems can be avoided. Write code that avoids these problems.
- Define semaphores, mutexes, and other synchronization primitives, explain their purpose, and describe their internal implementation.
- Describe possible problems that arise from improper use of synchronization primitives (such as deadlocks) and present their solutions.
- Write, compile, debug, and execute C programs that use UNIX synchronization primitives.
- Describe operating system scheduling and use UNIX interfaces to set and modify scheduling policy parameters.
- Define UNIX signals and signal handlers, and describe their use.
- Write, compile, debug, and execute C programs with processes and threads that interact by invoking and catching signals.
- Describe, configure, and use operating system timers and clocks.
- Describe the concepts of I/O devices, files, directories.
- Explain the internal implementation of files systems and operating system I/O.
- Write, compile, debug, and execute C programs that use files and I/O on UNIX.
- Describe the machine memory hierarchy, describe its components such as caches and virtual memory, and explain memory management mechanisms pertaining to these components such as paging and segmentation.
- Write, compile, debug, and execute C programs that make use of memory management functions.
- Explain the concept of DMA.
- Describe the protocols (such as TCP and IP) and interfaces (such as sockets) used for communication among different computers.
- Write distributed applications that communicate across a network.
Book
No textbook is required (we will be building our own crowd-based book) but if you really want to buy some books we recommend the following custom book Angrave put together in 2007:
Introduction to Systems Concepts and Systems Programming
University of Illinois Custom Edition
Copyright 2007 by Pearson Custom Publishing
ISBN 0-536-48928-9
This is a custom text composed of excerpts from:
- William Stallings, "Operating Systems: Internals and Design Principles", Fifth Edition.
- Kay A. Robbins and Steven Robbins, "UNIX Systems Programming: Communication, Concurrency, and Threads".
- Randal E. Bryant and David R. O'Hallaron, "Computer Systems: A Programmer's Perspective".
If you prefer to buy complete books we recommend
- William Stallings, "Operating Systems: Internals and Design Principles", Fifth Edition.
- Kay A. Robbins and Steven Robbins, "UNIX Systems Programming: Communication, Concurrency, and Threads".
- Randal E. Bryant and David R. O'Hallaron, "Computer Systems: A Programmer's Perspective".
- Operating Systems: Internals and Design Principles, Fifth Edition by William Stallings, Prentice Hall ISBN 0-13-147954-7.
- UNIX Systems Programming: Communication, Concurrency and Threads by Kay A. Robbins and Steven Robbins, Prentice Hall ISBN 0-13-042411-0
- Modern Operating Systems (Second Edition), Andrew S. Tanenbaum, Prentice Hall, 2001
- Applied Operating System Concepts, Silberschatz, Galvin, Gagne, John Wiley & Sons, Inc.
- Operating System Concepts, Silberschatz and Galvin
- The Design of the Unix O.S., Maurice J. Bach.
- The UNIX System, S. R. Bourne.
- The Mythical Man Month, F. Brooks.
- Operating System Design, D. Comer, T. Fossum.
- Internetworking with TCP/IP, Doug Comer.
- An Introduction to Operating Systems, Harvey M. Deitel.
- Operating Systems: Design and Implementation, Andrew S. Tanenbaum.
- The Logical Design of Operating Systems, Alan Shaw.
- Operating Systems, Internals and Design Principles, William Stalling.(3rd Edition).
Grading
The following is subject to minor changes.
Final Exam: 0x20%
Programming Assignments: 0x20%
Quiz 0x20%
Homework/other 0x04%
Course scores: We publish the following thresholds: 90: A- 80: B- 70: C-
There are weekly exam quizzes. These will typically be during lecture. For grading we will drop your lowest 3 quiz scores. Sickness/ vacation / sleep - whatever - we don't care. Miss 5+ = Fail.
The 3 hour Final exam is comprehensive and will test all CS241 topics including programming topics covered in the MP and programming challenges. Final exam is during exam week. Do not book your flights until the exam date is known. Early exams will not be offered. Conflict final exams will be offered if you have 3 exams in a 24 hour period or you have an exam in another, smaller enrollment course at the same time.
Grading issues should be raised with your TA during section, or posted privately on Piazza.