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:
- Understand advanced UNIX operating system concepts and terminology.
- Become familiar with basic Interprocess Communication issues and techniques in Unix programming, including message queues, shared memory, and semaphores.
- Become familiar with shared libraries and how to build them.
- Become familiar with socket programming using the Berkeley socket C API.
- Become familiar with both the theory and practice of making Remote Procedure Calls in C on the Unix platform.
- Become familiar with multithreaded programming in C using POSIX Threads on Unix.
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.
Michael Kerrisk, The Linux Programming Interface