CPS 444/544 Systems Programming I Lecture notes
- Introduction to systems programming in UNIX & C ([UPE] Preface, Ch 1-3, 6)
- introduction &
the UNIX philosophy
(class UNIX page,
vi quick reference,
vi
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) (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)
- processes
(identification; getpid, creation;
fork, & termination) (Ch 6)
- process environment (variables,
configuration, & customization) (Ch 3, §6.9)
- process manipulation (wait and
exec)
- implementing I/O redirection
& interprocess communication
(IPC & special files; pipes & FIFOs)
(§§4.7, 6.1-6.4)
- signals, signal handling, & (shell)
job control
- 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) &
interprocess communication
- sed (§4.3)
- awk (§4.4)
- Shell programming ([UPE] Ch 3, 5)
- command &
control
- numbers &
arrays
- Automatic program generation ([UPE] Ch 8)
- scanning
(finite state automata &
lex)
- compilation (Makefiles,
make tutorial,
another make tutorial,
exercise in writing a Makefile) & configuration
(RCS) management
- parsing
(Backus-Naur form)
- yacc
- 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)
Acknowledgment: the majority of the diagrams in these notes were drawn
or (re-)generated by John P.V. Cresencia using xfig.
References
| [C] |
C Language for Experienced Programmers, Version 2.0.0, AT&T, 1988. |
| [CGLY] |
T. Niemann. A
Compact Guide to Lex and Yacc. ePaperPress.
|
| [CPL] |
B.W. Kernighan and D.M. Ritchie. The C Programming Language.
Prentice Hall, Upper Saddle River, NJ, Second edition, 1988. |
| [COPL] |
R.W. Sebesta.
Concepts of Programming Languages.
Addison-Wesley, Boston, MA, Sixth edition, 2003. |
| [EOPL] |
D.P. Friedman and M. Wand.
Essentials of Programming Languages.
MIT Press, Cambridge, MA, Third edition, 2008. |
| [LY] |
J.R. Levine, T. Mason, and D. Brown. Lex and Yacc.
O'Reilly, Cambridge, MA, Second edition, 1995. |
| [OSCJ] |
A. Silberschatz, P.B. Galvin, and G. Gagne.
Operating Systems Concepts with Java.
John Wiley and Sons, Inc., Seventh edition, 2007. |
| [PGUS] |
M.G. Sobell. A Practical Guide to the UNIX System.
Addison-Wesley, Reading, MA, Third edition, 1995.
|
| [TKS] |
M.I. Bolsky and D.G. Korn. The Korn Shell: Command and Programming
Language.
Prentice Hall, Englewood Cliffs, NJ, 1989.
|
| [UIAN] |
A. Robbins. UNIX in a Nutshell.
O'Reilly, Beijing, Third edition, 1999.
|
| [UPE] |
B.W. Kernighan and R. Pike. The UNIX Programming Environment.
Prentice Hall, Upper Saddle River, Second edition, 1984.
|
| [USP] |
K.A. Robbins and S. Robbins.
UNIX Systems
Programming: Concurrency, Communication, and Threads.
Prentice Hall, Upper Saddle River, NJ, Second edition, 2003. |
| [USPG] |
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.
|