CPS 444/544 (3 sem hrs) provides an introduction to systems programming in UNIX and C. Topics include library and system calls, operating system structures, concurrency, and interprocess communication (pipes and signals). Students can also expect a survey of various software tools supporting systems programming, including gcc, gdb, make, sed and awk, and lex and yacc. The course does not aim to be comprehensive, but rather focuses on thematic issues. Assignments are designed to provide students with a pragmatic exposure to these tools as well as issues faced by modern practitioners. CPS 444/544 is a programming-intensive course and assumes no prior experience with UNIX or C.

Syllabus

Pre-requisite(s): CPS 350 (Data Structures and Algorithms) (with a minimum grade of C for students enrolled in CPS 544) and CPS 346 (Operating Systems)

Meeting times: T Th 4:30pm-5:45pm, MH 203

Instructor: Dr. S. Perugini, AN 145, 229-4079, instructor's last name at udayton dot edu, OH's: T Th noon-1:00pm, 5:45pm-6:45pm, and by appointment.

Teaching assistant: John Cresencia, AN 152, cresenjv at notes dot udayton dot edu, OH's: M W 2:00pm-4:00pm, and by appointment.

Required textbook: [UPE] The UNIX Programming Environment by B.W. Kernighan and R. Pike. Prentice Hall, Upper Saddle River, NJ, Second edition, 1984. ISBN: 0-13-937681-X.

Recommended textbook: [CPL] The C Programming Language by B.W. Kernighan and D.M. Ritchie. Prentice Hall, Upper Saddle River, NJ, Second edition, 1988. ISBN: 0-13-110362-8.

Course outline, lecture notes, and homework and reading assignments (to be completed prior to class):
  1. Introduction to systems programming in UNIX and C ([UPE] Preface, Ch 1-3, 6)
    1. introduction and the UNIX philosophy [class UNIX page, A Brief Introduction to C, vi handout, vi editor (also see the UW vi reference), in-class C exercises] (Ch 1): Aug 21
    2. system libraries; I/O (Ch 3, 6): Aug 26 28
    3. more topics in C (processes, memory management, and error handling) (Ch 6): Aug 28
    4. files and directories (manipulation and management) (Ch 2) and the UNIX shell (Ch 3): Sep 2
    5. process environment (variables, configuration, customization) (Ch 3, §6.9): Sep 4 [HW 1 due]
    6. more topics in C (storage classes, thread-safe functions, and macros) (Ch 6): Sep 9
    7. files and directories (inodes, hard and symbolic links) (Ch 2) and terminals: Sep 11 [HW 2 due] 16 23
    8. Exam I: Sep 18 (closed book, closed notes)

  2. Pattern matching and filters ([UPE] Ch 4)
    1. (extended) regular expressions and (e)grep [regexp exercises i and ii, exercise in writing REs, and more REs] (§4.1): Sep 25 [HW 3 due]
    2. filters (§4.2), interprocess communication, and sed (§4.3): Sep 30
    3. awk (§4.4): Oct 2

  3. Shell programming ([UPE] Ch 5)
    1. command and control: Oct 7 [HW 4 due]
      Exam II: Oct 14 (closed book, closed notes)
    2. numbers and arrays: Oct 16

  4. Automatic program generation ([UPE] Ch 8)
    1. scanning (finite state automata and lex): Oct 21 23 [HW 5 due]
    2. compilation (Makefiles) and configuration (RCS) management (exercise in writing a Makefile): Oct 28
    3. parsing (Backus-Naur form): Oct 30
    4. yacc: Nov 4 [HW 6 due] 6 11 18
    5. Exam III: Nov 13 (closed book, closed notes)

  5. UNIX system calls ([UPE] Ch 7)
    1. low-level I/O (open and close, and read and write): Nov 20
    2. processes (fork and wait): Nov 21
    3. processes (exec): Dec 2 [HW 7 due]
    4. special files (pipes and FIFOs): Dec 4
    5. signals (job control) and course reflection: Dec 9 [HW 8 due]

  6. Final Exam: Tue Dec 16, 4:30pm-6:20pm, MH 203 (comprehensive, closed book, closed notes)
Programming style guide

Grades: available in WebCT

Computer accounts: CPS account access @ home | UNIX account access | CPS labs hours | Keeping your password safe | A beginner's guide to effective e-mail
If you are unable to log into your CPS (Windows or UNIX) account or if you forget your CPS (Windows or UNIX) account password, contact the CPS systems administrator, Mr. Tramontana, at tramonjr at notes dot udayton dot edu or 229-3835, and be as specific as possible. Mr. Tramontana's office is MH 3D and his office hours are M-F 8:30am-4:30pm.

Helpful links: academic calendar | student handbook | UDit policies 

Feedback: Dr. Perugini welcomes any feedback you may have on the style of the lectures, the concepts presented in class, the course webpage, homeworks, deadlines, course and grading policies, or your general experience in the course.