About the Reviewer
Rick Wagner lives in Arkansas with his beautiful wife and 3 energetic kids.  Rick loves to explore software development tools and techniques, and really enjoys working through challenging problems.  Rick's a Sun Certified Enterprise Architect and a member of the International Association of Software Architects.
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.

Linux System Programming



Author(s) Robert Love
Publisher O'Reilly
Pages 388 pages
PubDate 2007, First edition
Reviewer Rick Wagner
Purchase and help Javalobby






Table of Contents






One Minute Review

Positives
  • Contains a large list of tips and techniques for low-level coding, written so beginners are given a gentle introduction and experts are given a thorough reference.
  • Content is technically excellent and thorough..
  • Code snippets are refreshingly simple.
Negatives
  • For developers not doing hard-core Linux systems programming, some material might never be of use.
  • Provides lots and lots of detail, which makes the book a little tiring to read at times. This is a positive for those using the book as a reference, though.

Sections

Intent and Audience

This book is for serious nuts-and-bolts developers who want to understand how the Linux kernel works and how to write code to best exploit it's implementation features. It can be of benefit to anyone that codes for Linux, though.

back to top Back to top

Relevance of material

For a dedicated Linux developer, this book is highly relevant and would serve as a great reference source. For an application developer working in higher-level languages (i.e. say a Java developer writing JEE or Spring components), the high-level overviews will be of value, but the nitty-gritty details will probably not be of immediate value.

back to top Back to top

Rating

Relevance
Readability
Overall

back to top Back to top

Chapter highlights

Chapter 1: Introduction and Essential Concepts
An excellent introduction to the high-level environment. Topics covered include Systems programming, the relationship between Linux Systems programming and the GNU C library and compiler, files (of all types, including special files), filesystems, processes, and threads. Overall, a very good chapter for any developer to read.

Chapter 2:File I/O
Covers the basics of files, including the system calls used to open, read, write and otherwise manipulate files. Multiplexed I/O is covered, as are three important subsystems of the Linux kernel that deal with File I/O: the virtual filesystem, page cache, and page writeback. Application coders at the high end of the stack may well encounter some glaze-over at this point.

Chapter 3: Buffered I/O
Explains the reasons for I/O buffering and discusses using the standard C library's I/O buffering facilities. Explains stream based operations and thread safety concerns, as well as a useful chapter summary that explains why the standard library's buffering solution is so popular.

Chapter 4: Advanced File I/O
Chapter 4,is the third chapter concerning file I/O – did I mention this book is for very detail oriented programmers? True to it's title, this chapter treats us to advanced techniques like Scatter I/O, Memory mapping of files, and asynchronous I/O techniques.

Chapter 5: Process Management
This chapter shows the ins and outs of Linux processes. What a process is, how it is created (including an excellent overview of the exec() and fork() calls) and the relationship between parent and child processes. There is much of use here for programmers who work at the application level. Clear explanations lead to some clues that can help solidify a higher-level programmer's overview of some of the APIs that are made available. (Note: many of the system calls covered here might resonate with coders in managed environments?it's easy to see how exec() is lightly wrapped in Java, for instance.) All things considered, this is a very good chapter for most any programmer whose code will run on a *nix platform.

Chapter 6: Advanced Process Management
Process Scheduling, Threading, Priorities, Processor Affinities, Real Time systems, and others are explained here. The contents of this chapter will be of use to anyone that's doing serious systems tuning, or wants a better understanding of how Linux allocates processing resources.

Chapter 7: File and Directory Management
As might be expected, this chapter covers the basics of directory creation and manipulation. Extended Attributes, a mechanism for associating key/value pairs with a given file, are an interesting feature outlined here. Other items of interest include explanations of hard and soft symbolic links and programmatic ways to manipulate them.

Chapter 8: Memory Management
Pages and Paging are explained here, along with allocation and freeing of dynamic memory and ways of manipulating the memory. Debugging techniques and tricks for commonly used memory manipulation tricks are explained, as are several other useful tactics for dealing with memory. This chapter will be of interest to anyone who deals with languages that allow direct memory manipulation.

Chapter 9: Signals
This chapter covers the important topic of signals, the asynchronous event notification available to Linux processes. A good overview is provided, followed by best practices for using signals, and the foundations of signal manipulation under Linux.

Chapter 10: Time
The Linux kernel measures time in three different ways, all of which are covered here. Sleeping, Timers, and of course structures used to represent time are covered, as well as a listing of techniques for getting and setting time.

Appendix: GCC Extensions to the C Language
Gnu's C implementation is the language of Linux systems programming, so a meaty appendix is included that outlines extensions to the C language that GNU provides. Suffice it to say that several interesting features are outlined, many of which should at least provoke good thought to programmers from any environment.

back to top Back to top

Resources

http://www.oreilly.com/catalog/9780596009588/
http://www.amazon.com/Linux-System-Programming-Talking-Directly/dp/0596009585