CPS 44 UNIX/Linux Programming Lecture Notes
Acknowledgment: the majority of the diagrams in these notes were drawn
or (re-)generated by John P.V. Cresencia using xfig.
- Introduction to systems programming in UNIX & C ([UPE] Preface, Ch 1-3, 6)
- introduction &
the UNIX philosophy
(class UNIX page,
vi quick reference,
editor, UW vi reference,
A Brief Introduction to C,
C exercises) (Ch 1)
- files & directories (manipulation
& management) (Ch 2)
- the UNIX shell (Ch 3)
- system libraries & I/O (Ch 3, 6)
- memory management (allocation/deallocation)
- terminals (Ch 2)
- compiling C in UNIX
(static vs. dynamic linking, macros, conditional compilation, error handling, & debugging;
RMS's gdb tutorial,
valgrind tutorial) (Ch 6)
- storage classes &
thread-safe functions (Ch 6)
- UNIX system calls ([UPE] Ch 7)
- low-level I/O
(open & close, & read & write)
- files & directories
(data structures, inodes, & hard & symbolic links) (Ch 2)
(identification; getpid, creation;
fork, & termination) (Ch 6)
- process environment (variables,
configuration, & customization) (Ch 3, §6.9)
- process manipulation (wait and
- implementing I/O redirection
& interprocess communication
(IPC & special files; pipes & FIFOs)
- signals, signal handling, & (shell)
- Pattern matching & filters ([UPE] Ch4)
- regular expressions (grep) &
extended regular expressions
(egrep; regexp exercises
i & ii, exercise in writing REs, & more REs) (§4.1)
- filters (§4.2) &
- sed (§4.3)
- awk (§4.4)
- Shell programming ([UPE] Ch 3, 5)
- command &
- numbers &
- Automatic program generation ([UPE] Ch 8)
(finite state automata &
- compilation (Makefiles,
another make tutorial,
exercise in writing a Makefile) & configuration
- Putting in all together
- building client-server architectures and applications
(e.g., token ring of processes)
- implementing command shells
- compiler construction
- Selected advanced topics
- computer security (buffer overflows)
- distributed systems (remote procedure calls)
||C Language for Experienced Programmers, Version 2.0.0, AT&T, 1988.
||T. Niemann. A
Compact Guide to Lex and Yacc. ePaperPress.
||B.W. Kernighan and D.M. Ritchie. The C Programming Language.
Prentice Hall, Upper Saddle River, NJ, Second edition, 1988.
Concepts of Programming Languages.
Addison-Wesley, Boston, MA, Sixth edition, 2003.
||D.P. Friedman and M. Wand.
Essentials of Programming Languages.
MIT Press, Cambridge, MA, Third edition, 2008.
||J.R. Levine, T. Mason, and D. Brown. Lex and Yacc.
O'Reilly, Cambridge, MA, Second edition, 1995.
||A. Silberschatz, P.B. Galvin, and G. Gagne.
Operating Systems Concepts with Java.
John Wiley and Sons, Inc., Seventh edition, 2007.
||M.G. Sobell. A Practical Guide to the UNIX System.
Addison-Wesley, Reading, MA, Third edition, 1995.
||M.I. Bolsky and D.G. Korn. The Korn Shell: Command and Programming
Prentice Hall, Englewood Cliffs, NJ, 1989.
||A. Robbins. UNIX in a Nutshell.
O'Reilly, Beijing, Third edition, 1999.
||B.W. Kernighan and R. Pike. The UNIX Programming Environment.
Prentice Hall, Upper Saddle River, Second edition, 1984.
||K.A. Robbins and S. Robbins.
Programming: Concurrency, Communication, and Threads.
Prentice Hall, Upper Saddle River, NJ, Second edition, 2003.
||S.G. Kochan and P.H. Wood. UNIX Shell Programming.
Hayden Books, Carmel, IN, 1990.
© S. Perugini, Fall 2008, University of Dayton.
Permission to use ideas about
the organization of topics and any notes or material is granted,
provided suitable acknowledgments and citations are made.