Overview

Instructor Patrick McDaniel (mcdaniel 'at' cse.psu.edu)
Section Information
# Times Location TA
1 MWF 2:30-3:20pm 101 Osmond Laboratory Junpeng Qiu
2 MWF 3:35-4:25pm 267 Willard Building Prashanth Thinakaran
Office Hours Prof. McDaniel: MW 1:00-2:15 or by appointment @ Room 360A IST
TA Qiu: Tu 10:00am-12:00pm, Thu 7:00pm-9:00pm @ Room 338E IST
TA Thinakaran: MW 10:30am-12:30pm @ Room 359 IST
Credits 3
Course Textbooks Computer Systems: A Programmer's Perspective, Bryant and O'Hallaron
C Programming: A Modern Approach, K.N. King
(Optional) Harlen Hahn's Guide to Unix & Linux, Harlen Hahn

This course explores the art and methods of systems programming. Practically speaking, lectures and course assignments will provide students experience programming in C within the UNIX environment. UNIX tools will be introduced, as will the general UNIX philosophy. Fluency in use of the command line will be encouraged and expected, as will canonical compiler tools such as gcc. We will examine the use of shell programs, compilers, build sequences, memory management, filesystems, signal processing, parallel programming, and other topics essential to computer scientists. In addition, we will introduce students the basics of systems administration on UNIX virtual machines.

A detailed list of a lecture by lecture contents, assignments, and due dates (subject to change as semester evolves) is available on the course schedule.

Course Philosophy

System programming concerns the development of software modules and services used by applications, e.g., de-fragmenter, web-servers, search tools, backup systems, etc. This course will provide information and experience required to understand, design and implement components of large and small software systems.

In general, students successfully completing the coure will be able to evaluate design alternatives according to engineering best-practices, specifications, performance analysis, robustness, etc. This course will investigate one system and one programming language in detail through demonstration programs programming assignments. The specific system is Unix, a family of operating systems forming a complete standardized programming environment based on the idea of software tools. The specific language is C, which is widely used for operating system implementations, and which forms the basis for the C++ and Java languages studied in the prerequisite courses. This will help students understand operating system services available to application programmers, and provide a firm ground for study of operating systems in general.

Important: This course covers the basic skills and topics that form the foundation of later CMPSC and CMPEN courses. For this reason, it is essential that every student attend and learn the material. It will be nearly impossible for students to complete later courses in these majors without mastery of this material.

Grading

The course will be graded on exams, course projects, and class participation in the following proportions:

Percentage Activity
40% Course Projects
12.5% Mid-term Exam
12.5% Mid-term Exam
25% Final Exam (week of Dec 16, time/date TBD)
10% Class Participation and quizzes

Course Projects

The course projects requires the each student student to build a complete course projects as assigned in class. The details of the projects will be made in class and through handouts made available on the course website.

Policy: The course projects are to be carried out individually. Students are explicitly not allowed to share information, source code, or even discuss the contents of the projects. Any violation of this policy will be considered cheating and will result in the student being removed from the class and given an 'F' grade.

Students are forbidden from copying code, makefiles, or any other material from the Internet. Any violation of this policy will also be considered cheating, and handled as described above.

Class Participation

Course lectures will be driven the contents of assigned reading. Students are going to be required to participate in discussions of the content during each lecture. Hence, the students ability to exhibit comprehension of the material is essential to a passing grade.

Lateness Policy

Assignments are assessed a 10% per-day late penalty, up to a maximum of 4 days after which a zero grad will be given. No exceptions. Period.

Virtual Machines

As part of the course projects, every student will be required to maintain a virtual machine on a personal computer or on a CSE server. Students are responsible for administrating and maintaining these virtual machines, and are encouraged to back them up frequently.

Course Prerequisites

You must have completed and passed (with a grade of C or better) the prerequisite course CMPSC 221, Object Oriented Programming with Web-Based Applications, which uses Java. You must have completed and passed (C or better) the earlier courses CMPSC 121 and 122, which use C++. If, instead, you have completed and passed similar courses elsewhere, contact the instructor. Prior experience with Unix or C is not expected, but you should know C++ very well, and be familiar with an integrated development environment such as Microsoft's Visual Studio.

You should take CMPEN 331, Computer Organization and Design, at the same time as this course, or within one semester of it. The connection between these courses would be stronger if we could require you to take both at the same time, but that's not possible. In 331, you learn about the basics of memory organization (registers, cache, main memory, virtual memory), instruction execution, exceptions and interrupts, and the translation of procedural programming languages into machine instructions.

This is a three-credit course, and you can expect to spend a lot of time outside of class with reading and programming. To avoid turning the outside programming into a nightmare of unsuccessful debugging, you should recognize symptoms of confusion early, and promptly ask for help from the instructor or TA.

We will often give you some code as examples or as a starter kit for an assignment, and use of that material is encouraged. After that point, the programming work should be done on your own.

The two books required for this course are excellent introductions to C and Unix system programming, but they won't be your only references. The optional book is an excellent introduction to the use of Unix. We hope that you will turn to these books first as a source of information and examples, and we will supplement them with extensive notes, frequent class discussions, and occasional out-of-class help sessions. There are many on-line sources of information, and we will indicate some good ones. In general, though, Google search is a real time sink, and we do not recommend its use as a programming manual. There's a lot of bad stuff out there, and if you have trouble distinguishing good advice from bad, then stick with the recommended sources.

Required Texts

Most of the course readings will come from seminal papers in the field. Links to these papers will be provided on the course pages as the assignments are made.

Ethics Statement

This course considers topics involving systems. As part of this investigation we will cover technologies whose abuse may infringe on the rights of others. As an instructor, I rely on the ethical use of these technologies. Unethical use may include circumvention of existing security or privacy measurements for any purpose, or the dissemination, promotion, or exploitation of vulnerabilities of these services. Exceptions to these guidelines may occur in the process of reporting vulnerabilities through public and authoritative channels. Any activity outside the letter or spirit of these guidelines will be reported to the proper authorities and may result in dismissal from the class.

Any instance of sharing or plagiarism, copying, cheating on tests, or other disallowed behavior will constitute a breach of ethics and will result in dismissal from the class with a failing grade.

Students are responsible for reporting any violation of these rules by other students, and failure to constitutes a ethical violation that carries with it similar penalties.

When in doubt, please contact the course professor for advice. Do not undertake any action which could be perceived as technology misuse anywhere and/or under any circumstances unless you have received explicit permission from Professor McDaniel.

Course Updates

[08/13/2013] I have put up a preliminary website for the CMPSC311 course. More details about the course content will be provided over the coming days, weeks, and months.

[08/30/2013] The course schedule has had a lot of detail added to it. Please review the schedule to see additional readings and for a view of the structure of the course.

[10/01/2013] Assignment #3 and a set or related slides is now available for review as is the starter code.

[10/17/2013] I have placed a number of test vectors for Assignment #3. The output signatures for each of the simple input sets linear, and random should be downloaded. You can compare the output of your program on the input files to make sure your program works correctly.

[10/22/2013] The tarfile for the in-class assignment here. Please download and compile this in preparation for the class on Wednesday.

[10/23/2013] Assignment #4 is now available for review as is the starter code.

[11/05/2013] My code for the driver portion of Assignment #3 is now available for review here.

[11/09/2013] Notes from the November 7th review session for Assignment #4 is now available here. These were contributed by a student (thanks Seth!).

[11/21/2013] Assignment #5 is now available for review as is the starter code.

[12/1/2013] Due to popular request, I will be holding the final exam on the last day of class (December 13th). Some notes on the last couple of weeks of class:

  1. As I mentioned, the final exam will be held on the last day of class.
  2. To help prepare, there will be a study session and lecture on social engineering Thursday night starting at 8pm and going until whenever. I will let everyone know where we will be holding the lecture.
  3. In order to give everyone some extra time to prepare for the final, I will be accepting assignment #5 without a late grade until midnight Sunday, December 15th. There will be NO EXTENSIONS.

[12/3/2013] I have included some helpful notes for assignment 5. Please review.

[12/6/2013] See the notes from the review session for assignment 5.