http://www.spinellis.gr/pubs/Breview/2003-CR-USP/html/review.html
This is an HTML rendering of a working paper draft that led to a publication. The publication should always be cited in preference to this draft using the following reference:
  • Diomidis Spinellis. Book review: UNIX systems programming: Communication, concurrency, and threads. ACM Computing Reviews, 45(3):142–143, March 2004. Green Open Access

The document's metadata is available in BibTeX format.

Find the publication on Google Scholar

This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author's copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder.

Diomidis Spinellis Publications


Copyright © 2003 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org.

Book review: UNIX Systems Programming: Communication, Concurrency, and Threads

Diomidis Spinellis
Athens University of Economics and Business

Kay A. Robbins and Steven Robbins
UNIX Systems Programming: Communication, Concurrency, and Threads
Prentice Hall PTR, Upper Saddle River, NJ, 2003
893 pp.

Systems programming is a challenging, unforgiving, educating, and rewarding activity. Programs that intimately interact with the underlying operating system for providing infrastructure services have to be extremely reliable, efficient in their use of the resources they handle, as well as secure and resilient against malicious attacks. Errors made at system program level can propagate to end-user application programs and can lead to data corruption, compromised systems, or unresponsive systems in millions of installations. On the other hand, writing a robust and useful systems application can be a source of satisfaction and pride that only a systems programmer can describe.

The book "UNIX Systems Programming" is an updated edition of a volume originally titled "Practical Unix Programming". It aims, and mostly succeeds, in making the art of systems programming in the Unix environment (and this includes flavors of open source POSIX systems such as Linux and FreeBSD) accessible to any reasonably skilled programmer. On top of that, the book doubles as an operating systems textbook, presenting many important concepts from a practical point of view.

The text is divided into four parts. The first part covers fundamental concepts like programs, processes, input/output, directories, and special files. The next two parts deal with asynchronous events and thread-based concurrency. The last part covers communication using the Internet protocols. All examples presented in the book are based on the most recent versions of the POSIX standards and the C language, down to the use of the new "restricted" keyword in function prototypes. The POSIX effort commendably standardizes an area of practice where conflicting implementations and gratuitous differences by Unix offerings of different manufacturers have caused programmers untold grief. However, as is typically case in the results of standardization efforts, the standard's prose can be difficult to comprehend. The authors have invested considerable effort into making the standard accessible to their readers by disentangling the various POSIX extensions and presenting the standard in the form of an (idealized) running operating system. Existing systems are slowly converging to this ideal, so readers will increasingly face a Unix system that matches the book's description irrespective of their system's roots. In fact, the book's numerous examples were tested on Solaris 9, RedHat Linux 8, and the (FreeBSD derived) Max OS 10.2.

The writing style is clear and often errs on the side of explaining concepts in too much detail, rather than too little. The authors have adopted a style where exercises with answers are sprinkled throughout the text. This literaly device may appear strange on the first encounter, but actually proves to be quite effective in bringing into life a subject that can sometimes be dry. In addition, two pedagogical elements of the book stand out: the combined presentation of theoretical concepts (e.g. deadlocks) within the context of the relevant library facilities (e.g. thread synchronization primitives) and the numerous practical complete projects that appear in the book. These include the implementation of a token ring of communicating processes, a library of virtual timers, a shell, a threaded print server, a parallel virtual machine, a web redirector, an Internet radio system, and a server performance characterization suite.

Could the book be improved? In many places the reader will encounter detailed descriptions of numerous different operating-system facilities and low-level directions for using applying them, but will not find prescriptive guidance on the context in which the facilities are useful. In other places too much emphasis is placed on the underlying API and less on concrete problems that systems programmers would want to solve. On the whole however, the book's presentation is outstanding, the diagrams are clear, and the code samples carefully written. A list of 137 references and a detailed index complete a book that will probably be treasured by a new generation of systems programmers.