CS 214 Systems Programming Syllabus Fall 2011
Instructor:
Brian Russell
morbius@cs.rutgers.edu
Office Hours: Mondays 8:30-9:30 pm, Hill 403.
TAs:
Chris Mansley
cmansley@cs.rutgers.edu
Office Hours: Fridays 3:00-4:00 pm, Hill 492.
Yuanle Lian
yuanlian@cs.rutgers.edu
Office Hours: Mondays 9:00-10:00 am. Hill 486.
Daniela Vianna
dvianna@cs.rutgers.edu
Office Hours: Friday 10:00-11:00 am, Hill 404.
Objective
The aim of CS214 is to
introduce the student to
the process of writing low-level programs that
interact directly with a computer's operating system and hardware,
as well as to develop the student's ability to
build large applications in a team environment.
Upon completion of this course, the successful student should be able to
design, write, test, and analyze moderately complicated programs
using the C programming language and UNIX/Linux operating systems.
Prerequisite Knowledge
- Structured programming in a high-level language (such as Java).
- Standard data structures (lists, trees, graphs, hash tables).
Textbook
The following texts are available online, free of charge.
The textbooks do not cover all material discussed in class,
and are not a substitute for attending lectures.
Topics Covered in CS214
The following list is organized by topic,
not by chronological order of coverage in the course.
- Programming in C
- Basic syntax, standard I/O, data manipulation, flow control
- Pointer manipulation, dynamic memory management
- Error handling and debugging
- Programming under UNIX
- Advanced debugging (gdb)
- Performance profiling (gprof)
- File I/O
- Signal handling
- Scripting
- Large-scale development
- Modules, headers, linking, makefiles
- Version control
- Concurrent programming
- Process creation and communication
- Multithreaded programming, synchronization
- (optional) Embedded systems programming
- Developing an embedded application
Lecture Schedule
Sept 1 Into to C
Sept 6 C program structure, C functions
Sept 13 C preprocessor, formatted I/O
Sept 15 Dynamic memory management
Sept 20 Data Structure design
Sept 22 File I/O
Sept 27 multi-file projects, makefiles, directory I/O
Sept 29 gdb
Oct 4 libraries
Oct 6 signals and event-based programming
Oct 11 signals and processes
Oct 13 valgrind and memory-related bugs
Oct 18 caching
Oct 20 version control, CVS
Oct 25 Threads
Oct 27 Thread synchonization (mutex locks, semaphores)
Nov 1 Thread synchronization (condition variables), thread patterns
Nov 3 Thread patterns
Nov 8 signals and threads
Nov 10 midterm
Nov 15 UNIX/Linux commands, BASH shell
Nov 17 BASH shell scripting
Nov 22 regular expressions, grep, awk, sed, tr
Nov 24 more shell scripting
Nov 29 style
This schedule may change as needed.
Interesting Programs
Here's the signal0.c file.
Here's the signal1.c file that prints blocked signals.
Here's the signal2.c file that responds to changes in window size.
Here's the timer1.c file that implements a timer.
Here's the thread1.c file that implements a (really) simple multithreaded application.
Here's the thread3.c file that implements some mutex protection in a multithreaded application.
Here are some dining philosophers programs diners1.c and diners2.c.
Here are some producer/consumer programs prod_consum.c and prod_consum2.c.
Some Notes
Here are the notes for POSIX multithreading primitives.
And the notes for POSIX mutual exclusion locks.
And the notes for POSIX condition variables.
Expected Work
Students are expected to attend all lectures and perform all reading assignments prior to lecture. Students are also expected to attend all recitation section meetings. Students will be evaluated according to their performance on a semester long programming project, a mid-term examination, and a final examination.
Project
WARNING: This is a project course, which means that this course should give you more than a passing knowledge of what writing working network programs entails. The project will be a major undertaking. If you complete the projects, you will have learned a lot. However, assess your commitment to this course realistically. If you don't have the time or the inclination to work hard on the project, you would be better off not taking the course. You will have to learn how to build and debug reasonably sized C programs and make them robust to outside errors. You will also have to describe how your program work in a written document.
This one large project will be assigned, as three sub-projects. Up to 2 students can work as a group for each sub-project and you can change group members for each project . Students are required to complete the parts by the scheduled deadlines. Failure to turn in the project by the deadline using the electronic handin website will result in a zero for all team members. No exceptions!
Working Together and Academic Honesty
Cheating on projects and exams will not be tolerated. We want to protect the fairness and integrity of the class, so we run code similarity detectors on the projects and scrutinize exams for copying. Both parties in the exchange are liable; e.g. if you give away solutions to friends, you're putting yourself at risk too. If you get caught, it's a nasty process--- just don't go there! You're better off asking for help, or at worst, dropping the course and trying it again.
The department academic integrity policy can be found at http://www.cs.rutgers.edu/policies/academicintegrity/. You now need to click explicitly on a link when first login to our computing facilities, use handin, etc., that says you acknowledge being aware of the policy (which you can read through the login screen). If you fail to do the click-through by the end of September, your access to our facilities will cease October 1.
Grading
Midterm: 20 %
Final: 30 %
Project: 50%
The programming part of the projects are typically graded on how close they are to the functional requirements. The written portion is graded on how well the TAs can figure out how your project is constructed only from the written description. Exams are typically graded on a curve. As a rule of thumb, the mean is a "C'" and each standard deviation is one letter grade. This rule can be altered, however, if the class does exceptionally well or poorly.
I felt we should do our best to clarify up front how we grade your programming assignments. The TAs do the grading, but have all agreed to the same criteria for grading each programming assignment. Each programming assignment is worth 100 points. here are our grading criteria:
40% Correctness
- Percent based on number of test cases
40% Code Quality
- 20% Algorithmic
- 10% Reusability/Modularity
- 10% Decomposition
20% Documentation
- 10% Test Cases from Students
- 5% Comments
- 5% Documentation (Analysis, readme files, etc...)
The Gilligan's Island Rule
We do encourage you to talk to your classmates, provided you follow the Gilligan's Island Rule. After a joint discussion of an assignment or problem, each student should discard all written material and then go do something mind-numbing for half an hour. For example, go watch an episode of Gilligan's Island (or jersey Shore in modern terms), and then recreate the solutions. The idea of this policy is to ensure that you fully understand the solutions or ideas that the group came up with.
If you follow the Gilligan's island rule, often best route to follow to get a question answered is to ask, in order:
1. A classmate smarter than you.
2. Your TA.
3. The professor.