Book Review Department Editor Warren Keuffel
Book Review
Department Editor: Warren Keuffel, wkeuffel@computer.org
Updating a Classic Unix Text
Art Sedighi
Advanced Programming in the UNIX Environment, 2nd ed., Richard Stevens and Stephen Rago, Addison-Wesley, 2005, ISBN 0201433079, 960 pp., US$74.99
Richard Stevens’ legacy includes some popular computer science books and, more important, Unix programming books. Who would have thought that Unix and its relative, Linux, would grow in leaps and bounds over recent years? Hardly a day passes that I don’t hear about Linux, and it’s hard to find IT professionals it hasn’t affected. For this and many other reasons, Advanced Programming in the UNIX Environment needed an update. Stephen Rago has done just that, updating Stevens’ timeless material and adding two topics: Linux and Apple Computer’s FreeBSD-based operating system.
The second edition focuses on Linux, which has all but replaced System V. The text also covers FreeBSD because many people still use it. Most changes result from updated or newly formed standards in the field, most notably Posix and ISO C.Posix.1 now accompanies the Socket interface, along with other interprocess communication paradigms, so the book covers them all under the same roof. Rago also deleted some topics that are no longer useful, such as communication via modem or serial line.
If you haven’t read the first edition, you’re in for a treat. Advanced Programming in the UNIX Environment, 2nd ed. covers everything you need to know about Unix programming. It begins by explaining the underlying architecture of the Unix processes, file system, and I/O subsystem. The authors aid readers throughout the way by offering simple examples at first and then moving to more complicated and elaborate examples. The text then discusses topics such as threading, signals, and interprocess communication (IPC) using shred memory, showing the reader how complex Unix is.
Probably the most complex topic is threading. It might seem simple at first, until you consider the underlying hardware and infrastructure. The authors spend over 100 pages covering programming with threads, including some common problems such as dead-lock and starvation. As with the first edition, IPC methods (such as shared memory, sockets, queues, and messages) take center stage. The authors also explore numerous I/O methods, such as Select, Poll, and PSelect, with working examples showing best practices in Unix programming at every turn.
The second edition of Advanced Programming in the UNIX Environment is as good as the first. The updates reflect solutions to today’s challenges in Unix programming. Rago did an amazing job continuing the work of a computer-science legend.
Art Sedighi is a senior consulting engineer at DataSynapse and a freelance writer. Contact him at sediga@alum.rpi.edu.