CS3393 Unix Systems Programming
Instructor: John Sterling
- Programming in the Unix environment.
- Language: Primarily C. Some small amount of scripting.
What do you need to know in order to write Unix tools,
such as who, ls, pwd and ps? How do you implement a shell? How do
you write a client/server application, e.g. a web server? How do
you find the information that you need?
- Good programming skills in C or C++.
- Understanding of operating systems concepts.
- Tentative syllabus
If there are other topics that you would like to see covered,
please talk to me about them. I would be happy to adjust the
syllabus to meet the interests of the class, where possible.
- What this course is not about:
Scripting. We will look at simple shell scripts, however that is
not the main focus of the course. If you are interested in a
scripting course, try the course in Perl, a very popular and
very useful scripting language.
Kernel hacking. Certainly a very interesting topic, but this
isn't the course to cover it. Unfortunately, we don't currently
have any course that covers this material.
All resources that we use is class will be provided on NYU Classes.
Note that this is a programming course. Only take it if you want
to write code. The tests (closed book) will largely verify that
you have become familiar with the material, which you will only do
by having written plenty of code. I will also expect you to write
code on the exams.
- There will be eight to ten programming assignments.
Computing Environment / Projects:
Students registered in the course will have accounts on the
department's PDC computers running
In addition, I strongly recommend having some form of Unix (such
as Linux, FreeBSD, MacOS or Solaris) installed on your own
machine. For Windows
machines, cygwin may be sufficient
for some projects, but I am not sure that it will be adequate for
all. You could also install a virtual machine running
Note that unixes do vary. We will use the pdc machines as our base
reference. If you are using a different Unix on your personal
machine, be sure to check early in each project whether your
approach is compatible with Linux. "Bonus points" for
addressing and handling differences.
Lateness: Projects will be accepted late, but will be penalized at
10% per day. After five days, the project will only be accepted
"at the discretion of the instructor". Frankly,
getting behind in a programming course is a very bad
- Project descriptions will appear on NYU Classes.
- 30% for projects
- 30% for the midterm
- 40% for the final.
I value [constructive] class participation highly. No, I won't put a number
on it, but what you do in class will effect the grade you receive.
You will need references for unix programming, the C language and
working in the unix environment.
Books for unix programming. Please note that I am not "following"
any particular text. We will cover what I think is most
important, in the order that I think works best. That being said,
you need a good reference (not just google).
The preferred reference for Unix programming is
Stevens' Advanced Programming in the Unix
Environment. Stevens is highly recommended for
this course. If you are serious about becoming a Unix
programmer you should certainly own this book. It is well
written and is the "industry standard" resource for
this kind of work.
Some students may prefer a book that has more of the flavor of
a "textbook". If so, you might consider Unix Systems
Programming, Communication, Concurrency and Threads
as an alternative to Stevens.
C programming. There is really one and only one book for this,
Kernighan and Ritchie's The C Programming Language
(commonly known simply as K&R, referring to the authors).
This is the model that many authors have cited as their motivation
when writing books about other languages. It is small and to the
point. Do yourself a favor and buy it. The only downside is that
it is based on C89. The more recent standard, C99, relaxes a few
constraints (e.g. you no longer have to declare all local
variables at the beginning of a function, thank goodness), but
K&R is still a good solid introduction and reference to the
Using unix. There are lots of books on how to use Unix. I am not
an overly strong fan of any one of them. I list the title of one
example (Unix for Programmers and Users, Glass and Ables)
that is fairly widely used as an introductory guide, covering many
of the commonly used Unix features. In almost any case, when you
get to using Unix heavily you will want better guides to the tools
that you use a lot.
Others? Possibly a reference to your choice of editor. I have
provided a link to an Emacs reference card. Emacs is of course the
best editor on Unix or any other platform. That having been said,
some of you will likely use vi/vim. (No, I don't know why, but I
have provided a link to a reference card for it, too. [Note, I am
being flippant, vi has the advantage of being included in the base
install of any unix I have come across.]) And yes, there are lots
of other editors around, e.g. nano, notepad++.
Now for the book references:
- Advanced Programming in the UNIX
Environment 2nd or 3rd
ed.; W. Richard Stevens & Steven
Rago; Addison-Wesley; 2005. ISBN 0201433079
The third edition is pretty recent. I have not found anything
critical that would give it the edge over a hand-me-down of the
Unix Systems Programming, Communication, Concurrency and
Threads, Robbins and Robbins, Prentice Hall.
The C Programming Language, 2nd
ed.; Kernighan and Ritchie; Prentice
Every programmer should own a copy of this
Unix for Programmers and Users, Glass and Ables;
One of many books of its sort. A reasonable
introduction to using Unix shells and the common utilities.
C: A Reference Manual (5th
Edition);Samuel P. Harbison, Guy
L. Steele; ISBN 013089592X.
Mostly for compiler writers and
the like, but occasionally interesting.
Understanding Unix/Linux Programming, Bruce Molay;
Prentice Hall; ISBN 0-13-008396-8.
I have used this before.
It's fairly short and relatively easy reading. When I used it,
I always "updated" his code to more modern usage.
And Even More Resources:
Please let me know if there is anything else that you think should
be included here.
Various sites you can get versions of Unix
Maintained by John
Sterling (email@example.com) last
September 3, 2015