CS 241: System Programming Spring 2010 Course Syllabus Staff: Robin Kravets (Instructor) Office: 3114 SC Office Hours: Tuesdays 11-12, SC 3114 e-mail: [email protected] Brighten Godfrey (Instructor) Office: 3128 SC Office Hours: Wednesday 2-3, SC 3128 e-mail: [email protected] TAs: Wade Fagen, Liping Chen, Farhana Ashraf, Riccardo Crepaldi See class web page for office hours times and locations. Contact: All questions about or problems with the class contents, web page, procedures, HWs, MPs or other material should be posted to the class newsgroup. news: class.cs241 - All class questions - This is your one-stop help-line! - Will get answer < 24 hours news: class.cs241.announce - All class announcements (staff only) Email should only be used for personal questions not postable on the news group. e-mail: [email protected] Textbook: Introduction to Systems Concepts and Systems Programming University of Illinois Custom Edition Taken from: Operating Systems: Internals and Design Principles, Fifth Edition by William Stallings UNIX™ Systems Programming: Communication, Concurrency, and Threads by Kay A. Robbins and Steven Robbins Computer Systems: A Programmer's Perspective by Randal E. Bryant and David R. O'Hallaron Copyright © 2007 by Pearson Custom Publishing ISBN 0-536-48928-9 Prerequisites: CS 225, CS 231 and credit or concurrent registration in CS232 are the prerequisites for CS 241. 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. Thiscourse 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 (keyboard, screen, mouse, printers, hard disk, or network. 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). The C over UNIX/Linux is a very common combination used heavily by software that must provide high performance. It is much faster, for example, tha Java or C++ over Windows. 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: 1. Identify the basic components of an operating system, describe their purpose, and explain how they function. 2. Write, compile, debug, and execute C programs that correctly use system interfaces provided by UNIX (or a UNIX-like operating system). 3. List UNIX system calls, and invoke them correctly from within C programs. 4. Describe the difference between programs, processes, and threads. 5. Explain the meaning and purpose of process control blocks and other mechanisms that the operating system uses to implement the process and thread abstractions. 6. Write, compile, debug, and execute C programs that create, manage and terminate processes and threads on UNIX. 7. 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. 8. Define semaphores, mutexes, and other synchronization primitives, explain their purpose, and describe their internal implementation. 9. Describe possible problems that arise from improper use of synchronization primitives (such as deadlocks) and present their solutions. 10. Write, compile, debug, and execute C programs that use UNIX synchronization primitives. 11. Describe operating system scheduling and use UNIX interfaces to set and modify scheduling policy parameters. 12. Define UNIX signals and signal handlers, and describe their use. 13. Write, compile, debug, and execute C programs with processes and threads that interact by invoking and catching signals.14. Describe, configure, and use operating system timers and clocks. 15. Identify and apply principles of queueing theory to evaluate system performance. 16. Describe the concepts of I/O devices, files, directories. 17. Explain the internal implementation of files systems and operating system I/O. 18. Write, compile, debug, and execute C programs that use files and I/O on UNIX. 19. Describe the machine memory hierarchy, describe its components such as caches and virtual memory,
View Full Document