UNIX Systems Programming

Title UNIX Systems Programming (51081)
Quarter Winter 2016
Instructor Mark Shacklette (jmshackl@uchicago.edu)


Course Description
MPCS 51081 is a UNIX systems programming course that explores various topics in systems programming on the Unix platform.  This course is not a course in operating systems development.  We will focus on the Unix C APIs around file I/O, processes and signals, pipes, and System V interprocess communication.

In addition to the traditional systems programming topics, this course will also introduce students to a significant level of detail in the use of RPC (Remote Procedure Calls) and multithreaded programming (pThreads), including operating system support and models (1-1, many-1, many-many).   Students will be exposed to the numerous issues involved in safe and efficient multithreading strategies using the POSIX pThreads API as implemented by Linux's clone() and Solaris threads.  Multithreading architectures will be discussed as well as advanced issues such as mutexes, semaphores, race conditions,  deadlocks, etc.  Berkeley socket programming will be covered in detail, as well as the creation and use of shared libraries.

Because this is a programming course, students will be expected to know the C programming language upon course entry.

Specific Learning Objectives include:

  1. Understand advanced UNIX operating system concepts and terminology.
  2. Become familiar with basic Interprocess Communication issues and techniques in Unix programming, including message queues, shared memory, and semaphores.
  3. Become familiar with shared libraries and how to build them.
  4. Become familiar with socket programming using the Berkeley socket C API.
  5. Become familiar with both the theory and practice of making Remote Procedure Calls in C on the Unix platform.
  6. Become familiar with multithreaded programming in C using POSIX Threads on Unix.

Course Contents
Topics to be covered will include:

  • Unix History and Philosophy
  • Unix File I/O
  • Static and Shared Libraries
  • Unix Make Utility
  • Processes and Signals (fork, etc.)
  • Pipes (unnamed and FIFOs)
  • System V IPC (semaphores, message queues, shared memory)
  • Berkeley Sockets
  • Remote Procedure Calls
  • POSIX pThreads

There will be 8 laboratory assignments, one every week for the first 8 weeks (skipping the dates of the mid term and final exams):

  • Lab1:  Introduction (Week 1)
  • Lab2:  Basic Unix File I/O in C (Week 2)
  • Lab3:  Building Static and Shared Libraries in C with Make (Week 3)
  • Lab4:  Unix Signal Handling (Week 4)
  • Lab5:  Write a Basic Shell in C (Week 5)
  • Midterm Exam:  Week 6
  • Lab6:  SysV/POSIX Message Queues, Shared Memory, and Semaphores (Week 7)
  • Lab7:  Berkeley Socket Programming in C (Week 8)
  • Lab8:  Posix Multithreaded Programming in C (Week 9)
  • Final Exam:  Week 10

There will be a midterm exam and final exam covering the major topics of the course presented in lectures and reading.

Course Textbook
Michael Kerrisk, The Linux Programming Interface

Prerequisites (Courses)

B or above in MPCS 51040 C Programming. For students who have not taken and passed MPCS 51040, there will be a UNIX C Programming qualifying test. Details on how to sign up for the qualifying exam will be sent to the student mailing list.

Prerequisites (Other)

All students must have attended the Fall UNIX Bootcamp, or must have taken the UNIX waiver exam.


Core - Systems if taken prior to Summer 2015 quarter


Fridays 5:30 - 8:30


Young 302