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

CSE 216 or CSE 219 or CSE 260; 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

None

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 Projects
  • 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