CSE376

Course CSE376
Title Advanced Systems Programming in Unix/C
Credits 3
Course Coordinator

Erez Zadok

Description

Focuses on several aspects of producing commercial-grade system software: efficiency, reliability, portability, security, and survivability. Uses UNIX and C, which is heavily used in industry when developing systems and embedded systems code. Emphasizes techniques and tools to produce efficient, reliable, secure, and highly portable code. Requires substantial programming, as well as a course project.

Bulletin Link

Prerequisite Prerequisites: C or higher: CSE 320; CSE major
Course Outcomes
  • An understanding of the key objectives for high performance, highly-reliable commercial-grade systems software (e.g., efficiency, portability, security, and robustness).
  • An ability to apply software development techniques for achieving these objectives using the C programming language.
  • Working knowledge of Unix system development tools, scripts, and debugging.
Textbook

Supplemental Materials:

  • Brian Keringhan and Dennis Ritchie, The C Programming Language, 2nd ed., (ANSI version), Prentice-Hall Software Series, June 1988.
  • Brian Keringhan and Rob Pike, The UNIX Programming Environment, Prentice-Hall Software Series, March 1984.
Major Topics Covered in Course
  • Advanced C programming techniques
  • Unix system calls vs. libc calls, differences
  • Inner-working of C compilers: cpp, ccom, as, ld
  • Highly-robust error handling: surviving partial system failures
  • Advanced C preprocessor techniques
  • Use of preconditions, assertions, and comments in code
  • Emphasis on code readability, and correctness, then efficiency
  • Unix process structure: text (+shlib), stack, heap
  • Static libraries vs. shared libraries
  • Memory mapping APIs
  • Memory management using malloc/free, static/automatic/dynamic variables
  • Advanced pointers use and debugging
  • Advanced UNIX system calls (e.g., async/direct I/O, ACLs)
  • Bug detection, avoidance, and fixing; develop bug-fixing intuition
  • Writing code to avoid common C mistakes that are not caught by compilers
  • Advanced tools for memory corruption/overflow and pointer bugs
  • Stack overflow bugs: detection in user-land and kernel
  • Writing portable code on multiple Unix systems
  • Advanced Makefiles using GNU Make
  • Portability autotools: Autoconf, Automake, and Libtool
  • Unix user-level tools: git, g/cc, as, ld, ranlib, cpp, ls, cd,...
  • Unix manual pages
  • Unix shell scripts
Laboratory
  • File/directory encryption and integrity tool​
  • Memory allocation debugging library
  • Porting older C code to multiple Unix systems, shell scripting
  • Writing buggy code, debugging using assorted tools and techniques
  • Advanced system calls: mmap API, async/direct I/O, ACLs and Extended Attributes
Course Webpage

CSE376