The University of Chicago
Department of Computer Science

CSPP 51081 Course Syllabus
Fall 2010

Unix Systems Programming

Teaching Staff Course Home Texts and Resources General Course Information Course Schedule Grading Information

Teaching Staff
Instructor: Mark Shacklette
  Email:
  mark@cs.uchicago.edu (read hourly or so)
  mshack@post.harvard.edu (read hourly or so)

NOTE: ALL non-confidential email should be addressed to the email list
  Office:
  Ryerson 175A
  Office Hours:
  Wednesday, 3:30-4:30 pm (by appointment only)
  Wednesday, 4:30-5:15 pm (drop in)
Lead TA: Brian Martin
  Email: bsm@cs.uchicago.edu
  Office Hours:
Downtown (by appointment):
  Monday-Friday, 12:00-1:00pm
Campus:
  Sunday, 6:00pm-7:00pm
Associate TA: Soner Balkir
  Email: soner@cs.uchicago.edu
  Office Hours:
  10/11 - 3:00-5:00pm
  10/18 - 3:00-5:00pm
  11/1 - 3:00-5:00pm
Associate TA: Virgil Gheorghiu
  Email: virgilg@cs.uchicago.edu
  Office Hours:
  11/10 - 3:30pm-5:30pm
  11/17 - 3:30pm-5:30pm
  12/1 - 3:30pm-5:30pm

General Course Information
Prerequisites:
  1. Knowledge of C Programing is assumed and required. C will not be taught as part of this course.
  2. All students are required to have taken the CSPP Unix Bootcamp or the MacLab Unix Course prior to the first day of class (or have the requirement waived). Those who have not completed this requirement will need approval of the instructor, which will most likely not be granted unless you can demonstrate substantial experience using Unix.
  3. Basic familiarity with a Unix source code editor (vi, emacs, nedit, pico, gedit, etc.) will be necessary.
Description: CSPP 51081 is systems programming course which explores topics in systems programming on Unix. Topics to be covered in detail will include:
  • Unix History and Philosophy
  • Awk Programming
  • Unix File I/O
  • Static and Shared Libraries
  • Processes and Signals (fork, exec, etc.)
  • Pipes (unnamed and FIFOs)
  • System V IPC (semaphores, message queues, shared memory)
  • Berkeley Socket programming
  • Sun RPC
  • POSIX pThread programming

Various tools used in developing software in C on Unix will be covered, including gcc, gdb, ddd, gprof, cvs, etc.

Because this is a programming course, students will be expected to know the C programming language upon course entry.
Objectives: Upon completion of this course the student will:
  • Understand advanced UNIX operating system concepts and terminology.
  • Develop a command of the Unix Shell environment, including advanced Unix commands and utilities.
  • Learn basic AWK programming.
  • Become acquainted with the basic tools used to develop software in C on the Unix platform.
  • Become familiar with basic IPC issues and techniques in Unix programming.
  • Become familiar with socket programming using the Berkeley socket API.
  • Become familiar with both the theory and practice of making Remote Procedure Calls in Unix.
  • Become familiar with multithreaded programming in C using POSIX pThreads on Unix.
Academic Integrity: Students are expected to have read and understood the University's policy on Academic Integrity. This policy is detailed in the Student Manual of University Policies and Regulations, available online at http://www.uchicago.edu/docs/studentmanual/
Instruction Method: Methods include lecture and homework assignments.
Attendance: No formal attendance taken. There may be information presented in class that is not in the texts. You will be responsible for all information discussed in class and assigned in the required readings.
Make-up Work: If you miss an exam or quiz, you will need to speak with the instructor ASAP.  Prepare for unhappiness.
Class Participation: Students are expected to read the assigned texts before class in order to be able to full participate in the discussions.
Grading: Current students can find their grades and any returned commented work here.

Assigned work will be graded as follows:
8 Labs (25 points each) 200 pts
Mid-Term Exam 350 pts
Final Exam (or option below) 450 pts
Total 1000 pts

NB:  The end of the quarter is the time at which the final grade you have earned through your work in the quarter is recorded with the registrar.  It is not the time at which you realize that your lackluster effort has not winged the grade you had fancied, and the point at which you begin negotiations for extra credit opportunities.  There will be no extra credit (outside of a few optional questions on an exam) offered in this course, either at the beginning or at the end.  If you are disatisfied with the grade you earned at the end of the quarter, Your only options will be to retake the course the next time it is offered, or not.

Alternative to Final: Students may, with the prior permission of the instructor, opt to do either of the following  in lieu of the final exam:
  1. Write a 20-30 page page research >pape, double spaced with 1 inch margins, including bibliography and footnotes, detailing the internal activities and interfaces of some substantial portion of the Linux kernel (process management, memory management, virtual memory, file system, scheduling, etc.) The quality of the paper should be targeted as publishable.  You will need to demonstrate full command of the topic in detail through both the paper as well as possible oral review of its content with the instructor.  The approval process requires a 2 page detailed research topic statement including a proposed outline of contents, resources, etc. Plagarism, in any form, will result in an F for the course.
  2. Define a non-trivial systems programming project and implement it.  The approval process requires a 2 page statement of the project, detailing the project scope, deliverable, and tools to be used.  Delivery of the project involves a makefile that builds the software and supporting libraries, etc., and will be open to possible oral review with the instructor.  If you choose this option, you may tailor the labs to support the ongoing development of the project (where relevant) and with the approval of the instructor or TA.  Your project should include multiple topics of the course, for instance, multiple threads, thread concurrency controls, sockets, IPC, etc.  An example of a non-trivial programming project might be a multithreaded web server written in C that supports multiple simultaneous clients and basic HTML delivery and implements some subset of the HTTP protocol.  Plagarism, in any form, will result in an F for the course and reporting to the program director.
NOTES:
  1. You must obtain the instructor's approval, via email, for either of these options by 11:59pm, November 10th.  will be no exceptions to this.
  2. Plagarism in any form will result in a final grade of 'F' for the course and notification of the program director for disciplinary action.
  3. Both options produce the same total point availability as the final exam:  450 points out of 1000.
  4. You may not work together on either of these options. Both options must be completed on an individual basis.
Delivery Process: The due dates for labs are on the syllabus calendar in RED.  All labs are required.

Lab assignments, when completed, should be tarballed up into a single gzipped tarball and sent to the graders directly (NOT to the instructor).  The graders will post instructions on submitting labs.

For each part of the lab assignment there are detailed descriptions of what you should turn in. You should include ALL supporting files (source files, data files, etc.) as attachments to the submission email (a single message).  Please send only UNIX-readable (text) files (that is, no MS Word documents!!!).  Word documents will be considered a personal affront to the instructor and will result in ignominy and public humiliation.  All work is evaluated and graded on the LINUX CLUSTER (not solaris, hpux, irix, aix, etc.)

FAILURE TO PROVIDE AND DELIVER TO THE GRADERS ALL SCRIPTS, ALL COMMANDS, AND ALL SUPPORTING FILES, TEXT OR SOURCE, YOU USED TO DELIVER AND PRODUCE THE SOLUTION WILL RESULT IN A LOSS OF POINTS.  IF THE GRADERS, WORKING SOLELY ON THE LINUX CLUSTER, CANNOT REPRODUCE YOUR SOLUTION OR ANY PART OF YOUR SOLUTION FROM THE SET OF INFORMATION YOU PROVIDE, YOU WILL LOSE PARTIAL OR FULL CREDIT.

All assignments are due as specified on this syllabus and supporting lab pages.  Students who turn in work late, regardless of the reason, will receive 2 points off from the first day the assignment is due (calculated as the first 24 hour period following the due date and time), and continuing for 10 days.  Assignments turned in more than 10 days late from the original due date will not be accepted and the student will receive a 0 on the assignment.  The ONLY exception to this penalty will be a doctor's approved note of severe illness requiring overnight hospitilization, etc.  All late deliveries, regardless of cause, including, but not limited to acts of God, war, riot, embargoes, acts of civil or military authority, terrorism, fire, flood, tsumami, earthquakes, hurricanes, typhoons, tropical storms or other natural disasters, fiber cuts, strikes, shortages in transportation, facilities, fuel, energy, labor or materials, failure of the telecommunications or information services infrastructure, hacking, SPAM, or any failure of a computer, server or software, including Y2K errors or omissions, the common cold, the flu, asthema, stomach flu, work, work travel, family, childcare, golf, vacation, and other life-related exigencies and necessities, while unfortunate, will still incur the penalty.  It is assumed that you will have plenty of time to work on each assignment, and that an individual penalty or two will have little overall effect on a student's final grade, unless lateness is chronic or other grades are poor, in which case, of course, the penalty will be more cumbersome.  If you are late with a delivery and therefore receive a penalty (which you will if you are late for any reason) and it's an isolated incident and the rest of your work is excellent, the penalty should be innocuous.

The instructor reserves the right to alter the course contents, dates, times or percentage of credit based on time allowed and class progress through the course material. The instructor also reserves the right to curve grades if he deems it in the best interest of the majority of students.

Course Schedule
The Instructor reserves the right to alter the schedule as class progress dictates.

Abbreviation Text
BLP Beginning Linux Programming 
UNP1 UNIX Network Programming, Volume 1
EAP Effective Awk Programming
PPT Programming with POSIX Threads (optional )
APUE Advanced Programming in the UNIX Environment
USP UNIX Systems Programming (optional )
UULP Understanding Unix/Linux Programming (optional )

NOTE:  Numbers besides the references are chapter numbers.  Odd numbers like APUE 14.1-14.5 mean sections 1 through 5 of chapter 14 of APUE.
Class 1 September 29
Introduction & syllabus review
Historical Introduction to UNIX
 
BLP, 1,2,4 
[UULP 1]
EAP, 1-8

Intro LAB


Class 2 October 6
Introduction to Awk Programming

Tools and Compilation:

C compiler, compiling & linking
Creating and using static libraries Creating and using shared libraries

BLP 3,4,8,9 
APUE 3,4,5

  LAB 2

Class 3 October 13 Unix File I/O

Introduction to make 
Debugging with gdb & ddd

APUE 3,4,5,7, 10 
[USP 2,3,4,5] 
[UULP 3,4] 

  LAB 3

Class 4 October 20 Unix Processes & Signals

Introduction to Unix Processes

Signal Processing

 

BLP 11 
APUE 7, 8, 10 
[USP 10,11] 
[UULP 8,9] 

  LAB 4

Class 5 October 27
Process Creation:  fork & exec

Problem Children:  Orphans and Zombies

Process Communication:  
Unnamed & Named Pipes

APUE 9, 14.1-14.5 
BLP 12 
[USP 13(Pipes & FIFOs)] 
[UULP 10] 
  LAB 5
 
Class  6 November 3 MID TERM EXAM    (Written & Live) 
Mid Term Study Guide

Class 7 November 10
System V InterProcess Communication (IPC): 

Semaphores
Message queues
Shared Memory
BLP, 13 
APUE 14.6-14.11 
[USP 13(System V IPC Functions)] 
[UULP  15.3] 

  LAB 7

Class 8 November 17 C Socket Programming 
UNP1 1-9 
[USP 14] 
[UULP 11,12,13] 

  LAB 8


November 24 NO CLASS
Class 9 December 1 Sun RPC

Multithreaded Programming on Unix with POSIX pThreads
PPT 1-5, 8
[UULP 14]

 LAB 9
Class 10 December 8
FINAL EXAM: (Written (Cumulative) & Live (Classes 7, 8 & 9 only)) 
Final Exam Study Guide