Linux System Programming
Talking Directly to the Kernel and C Library
By Robert Love
September 2007
Pages: 388
ISBN 10: 0-596-00958-5 |
ISBN 13: 9780596009588




(3) (Average of 5 Customer Reviews)


Description
This book is about writing software that makes the most effective use of the system you're running on -- code that interfaces directly with the kernel and core system libraries, including the shell, text editor, compiler, debugger, core utilities, and system daemons. Written primarily for engineers looking to program (better) at the low level, this book can give any programmer an understanding of core internals that makes for better code, no matter where it appears in the stack.
Full Description
This book is about writing software that makes the most effective use of the system you're running on -- code that interfaces directly with the kernel and core system libraries, including the shell, text editor, compiler, debugger, core utilities, and system daemons. The majority of both Unix and Linux code is still written at the system level, and
Linux System Programming focuses on everything above the kernel, where applications such as Apache, bash, cp, vim, Emacs, gcc, gdb, glibc, ls, mv, and X exist.
Written primarily for engineers looking to program (better) at the low level, this book is an ideal teaching tool for any programmer. Even with the trend toward high-level development, either through web software (such as PHP) or managed code (C#), someone still has to write the PHP interpreter and the C# virtual machine.
Linux System Programming gives you an understanding of core internals that makes for better code, no matter where it appears in the stack. Debugging high-level code often requires you to understand the system calls and kernel behavior of your operating system, too.
Key topics include:
- An overview of Linux, the kernel, the C library, and the C compiler
- Reading from and writing to files, along with other basic file I/O operations, including how the Linux kernel implements and manages file I/O
- Buffer size management, including the Standard I/O library
- Advanced I/O interfaces, memory mappings, and optimization techniques
- The family of system calls for basic process management
- Advanced process management, including real-time processes
- File and directories-creating, moving, copying, deleting, and managing them
- Memory management -- interfaces for allocating memory, managing the memory you
have, and optimizing your memory access
- Signals and their role on a Unix system, plus basic and advanced signal interfaces
- Time, sleeping, and clock management, starting with the basics and continuing through POSIX clocks and high resolution timers
With
Linux System Programming, you will be able to take an in-depth look at Linux from both a theoretical and an applied perspective as you cover a wide range of programming topics.
Featured customer reviews

Beware of reviews by people who didn't read the review.,
August 27 2008
Submitted by
Stephan
[
Respond |
View]
No offense. Just step back, count to ten and you'll understand my comment. A Unix/Linux programmer understands by "System Programming" a description of the System Interface - which is the collection of System Calls allowing you to program the System (read kernel). You show me in this book the description of ONE such call and I retract everything I said.
Sincerely yours,
Stephan.
p.s. Write this book - I would become your admirer!
Excellent book!,
August 11 2008
Submitted by Anonymous Reader [
Respond |
View]
This is what I was looking for, for a long time. A succint book, not bloated and with code that does require arcane libraries to run, for me it was a godsend. Got the ebook edition, worth every penny. I was lacking in understanding of how the linux os really works under the hood and the book quenched my thirst thoroughly. It is a book definatly for beginners, so advanced users wont find that much of a challenge. For beginners its a fantastic read. Two thumbs up, quenched my thirst, looking forward to the next release!
Beware of reviews by people who didn't read the book.,
July 24 2008
Submitted by
Pat
[
Respond |
View]
The reviewer who said 'Beware' not only didn't read the book (as he readily admits) but didn't read the description thoroughly. Here is the offending line:
Even with the trend toward high-level development, either through web software (such as PHP) or managed code (C#), someone still has to write the PHP interpreter and the C# virtual machine
This book in no way covers C# or PHP. It is strictly system level programming in C.
Read all reviews
Good book for userspace developers,
March 27 2008
Submitted by
Douglas Schilling Landgraf
[
Respond |
View]
I liked Robert's book.
This is a good book (quick reference) for userland developers. I liked his approach.
In my opinion, he could improve his book going deeper on some examples, adding sockets chapter, mix more userspace and kernelspace.
I agree with last comment too, there are others books around this topic that could explain more in details some topics.
In the Bibliography section, the author did not include two of the most important books that cover related material: 1. "Advanced Programming in the UNIX Environment," by W. Richard Stevens, and 2. "Programming with POSIX Threads," by David R. Butenhof.
Beware!,
March 24 2008
Submitted by
Stephan Tiriac
[
Respond |
View]
Please note I do NOT own this book!
I look for this subject for some time now and I was enthusiastic when I saw the title in the list of Linux books. However reading the description of the book, words like C# or PHP brought me down at the ground level. I would have expected to read IPC, socket, thread,... These keywords are cruelly missing from the content of this book. I downloaded the Chapter IV, "Advanced File I/O" and my first impression got a strong confirmation. From what I saw in this fourth chapter this book is a gathering of man pages and raw, unexplained examples from the Net. A very unfortunate and hasty tentative to fill out a hole in the Linux literature. In my opinion this book will rather confuse the reader than enlighten.
If you want a good book about the System Programming buy rather the second edition of "Advanced UNIX Programming" written by Marc J. Rochkind and published by Addison-Wesley (sorry O'Reilly). It is not targeted at Linux but Linux is UNIX and the book covers well 99% of Linux System Programming.
Media reviews
"
Linux System Programming continues in the O'Reilly tradition of producing solid reads covering specialist topics...Robert Love takes great care to hold you by the hand as he covers each topic, and you feel that you're in the presence of a true master--which given Love's reputation is genuinely the case. So if you want to have a go at system programming, this should be on your wish-list...If you're a C programmer and you want to get the inside knowledge on working with the Linux kernel, buy this book."
-- Andy Hudson, Linux Format
"This reviewer just finished teaching a course in C in which the students used two other operating systems besides Linux. Had he known of this book, he would have required his students to purchase it--it would have answered many questions!"
-- R. P. Sarna, Maine Maritime Academy, Choice Reviews Online
Read all reviews