Channels ▼

Mike Riley

Dr. Dobb's Bloggers

The Linux Programming Interface Book Review

October 12, 2010

The expanding role of Linux in our lives is undeniable. From the servers that run our favorite websites to the smartphones that keep us on the grid, Linux continues to make a major impact in the way we connect, transfer and manipulate electronic data. However, few books have plumbed the depths of the heart of the Linux OS. Does this latest attempt by author and Linux hacker Michael Kerrisk satiate this market need? Read on to find out.Coming in at just over 1,500 pages, The Linux Programming Interface (TLPI)reminds me of the Linux version of Charles Petzold's Programming Windows in terms of size, scope and depth. Unlike Programming Windows, with the last published edition nearly 12 years old, TLPI is hot off the presses and intended for today's generation of computer software students and engineers. It also serves as a reminder of how this rapidly evolved OS is based on nearly 40 year old OS design principles and languages. Knowing the C language is an obvious prerequisite to extract meaningful information from the book, as well as a desire to learn the inner workings of the Linux kernel.

The book begins with a brief history on the development of Unix and Linux and the standards they employ, followed by a chapter on fundamental concepts (i.e., a breakdown of the kernel which serves as an outline of the chapters to follow). System programming concepts (getting familiar with glib) is followed by two chapters on File I/O. Processes, Memory allocation, users and groups, process credentials and time round out the first 10 chapters. System limits, process information, File I/O buffering, file systems and attributes (and extended attributes), access control lists (ACLs), directories and links and monitoring file events are also explored. Several chapters on signals (fundamentals, handlers, advanced features), timers and sleeping, processes (creation, termination, monitoring), program execution and threads (synchronization, safety, cancellation and more). The book continues with explanations of process groups, sessions, job control, priorities, scheduling and managing process resources. Chapters on Daemons, privileged programs, file and system capabilities, login accounting (the utmpx API), shared libraries, interprocess communication (IPC), pipes and FIFOs are then followed by several chapters on System V and topics (IPC APIs, message queues, semaphores, shared memory). More chapters on follow on file locking, sockets (struct sockaddr_un and socketpair(), TCP/IP fundamentals, internet domains, TCP and UDP echo server designs and advanced topics such as the netstat, tcpdump, snedmsg() and recvmsg() system calls), terminals and alternative I/O models (multiplexing, signal-driven, the epos API, and the pselect() system call for example). The book concludes its 64th chapter on UNIX 98 and BSD pseudoterminals. Six brief appendixes cover the strace system trace command, command-line parching, null pointer casting, kernel configuration, additional references and solutions to selected exercises posed at the end of each chapter.

Before No Starch's TLPI came along, I had been recommending Wolfgang Mauerer's Professional Kernel Architecture, published two years ago by Wrox. TLPI benefits from having the latest Linux kernel to base its discussions on, as well as the 20+ years of UNIX development and teaching experience as well as the Linux kernel man-pages contributions that the author brings to the text. Still, the nearly one hundred dollar cover price will be a persistent barrier of entry for all but the most devoted students and developers of Linux kernel knowledge. There is no doubt after consuming TLPI that readers will be vastly more knowledgeable about the complexity underlying the Linux kernel, though for those merely interested so they can understand why and how certain popular system calls work the way they do, the Wrox title still holds a place on the bookshelf and is much easier on the wallet.

Good news, everyone! Just as I was going to post this review, the No Starch folks have informed me that the electronic edition of TLPI is forthcoming and will be fifty dollars less than the hardcover print version. Of course, for those not yet equipped with a purpose-built electronic reading device or still prefer the physical ink on paper approach, No Starch is also offering a free version of the Ebook with the purchase of the hardcover edition from their online store.

Title: The Linux Programming Interface Author: Michael Kerrisk Publisher: No Starch Press ISBN: 978-1-59327-220-3 Pages: 1,552 Price: $99.95 (Hardcover), $49.95 (Ebook)

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.