Start reading Linux System Programming on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here or start reading now with a free Kindle Reading App.

Deliver to your Kindle or other device

 
 
 

Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.
Linux System Programming: Talking Directly to the Kernel and C Library
 
 

Linux System Programming: Talking Directly to the Kernel and C Library [Kindle Edition]

Robert Love
5.0 out of 5 stars  See all reviews (4 customer reviews)

Kindle Price: £19.77 includes VAT* & free wireless delivery via Amazon Whispernet
* Unlike print books, digital books are subject to VAT.

Formats

Amazon Price New from Used from
Kindle Edition £19.77  
Paperback --  
Kindle Summer Sale: Over 500 Books from £0.99
Have you seen the Kindle Summer Sale yet? Browse selected books from popular authors and debut novelists, including new releases and bestsellers. Learn more


Product Description

Book Description

SYSTEM AND LIBRARY CALLS EVERY PROGRAMMER NEEDS TO KNOW

Product 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.

Product details


More About the Author

Discover books, learn about writers, and more.

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

4 star
0
3 star
0
2 star
0
1 star
0
5.0 out of 5 stars
5.0 out of 5 stars
Most Helpful Customer Reviews
20 of 20 people found the following review helpful
Format:Paperback
As a perl programmer recently thrown in to the world of C development on
Linux, I have been looking for something that would take my K&R level of
experience and bring it up to date with modern methods, hopefully
letting me write more efficient and reliable programs.

Robert Love, former "Chief Architect, Linux Desktop" at Novell, kernel
hacker of many years, and Gnome developer of well known features such as Beagle
and NetworkManager, attempts in this book to document the Linux system call
and C API to common systems programming tasks. Given that he developed
the pre-emptive kernel and inotify he has the knowledge.

Getting this book out of the box, I had wrongly been expecting a cookbook
style that I would get instant gratification from. Although structured
around common programming tasks, it doesn't lend itself to just dipping in.
The section on time lists a handful of ways that "time" is available to the
programmer; jump into the middle of the section and you might miss
the most suitable one for the job in hand. The book rewards reading it
in larger chunks.

This doesn't mean it is necessary to read it from cover to cover. Logically
organised into chapters around "things you want to do", such as file access,
memory management and process management it will lead you in with a survey of
techniques you might be familiar with, before drilling down with advanced
methods.

Knowing advanced methods for performance is great, but not at all costs. One
of the most useful and practical lessons this book gives is to encourage you
to think about error conditions that may occur during a system call.
Read more ›
Comment | 
Was this review helpful to you?
3 of 3 people found the following review helpful
5.0 out of 5 stars Recommended 3 Sep 2010
Format:Paperback|Verified Purchase
The first thing to say about this book is that it is very well written, very readable and with a good writing style. It is concise without being cryptic. It lends itself to being both a reference and a book that you could read from cover to cover. I wanted it as a refresher having done some Unix system programming, but with a lot a recent Windows work, for which it was ideal - I actually read the whole book (kindle version) in a day or so and found this was feasible and effective due to the writing quality. It doesn't discuss threads and sockets which is a pity, but there are other books which concentrate on these things. I only wish that some of the other books I've read recently had been as well written.
Comment | 
Was this review helpful to you?
4 of 5 people found the following review helpful
5.0 out of 5 stars T Taktakci 12 Nov 2008
Format:Paperback
When you talk about programming in Linux environment, you have to think user level and kernel level seperately. This book is a quite nice one explaining the topics in user level programming. I bought this book and read it in about two weeks, in parallel to my other tasks. I must say that it really helped me understand what system programming is. Even if your task is developing kernel level software/driver/module you have to be well versed in user level. I would suggest you read a user level programming book, strongly recommend this one, then study another kernel book which would make things much better for you. When you read the book you feel the writer's overall knowledge and experience on linux environment.
Comment | 
Was this review helpful to you?
0 of 5 people found the following review helpful
By d
Format:Paperback
Linux System Programming: Talking Directly to the Kernel and C Library. is not dead it is a life and kicking on Linux server kernels operating systems snd help to keep a life freedom, involving free hand creativity using advance libraries.
-Please download source code.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 3.7 out of 5 stars  9 reviews
42 of 43 people found the following review helpful
4.0 out of 5 stars Not quite deep enough 15 Nov 2007
By Simon Perreault - Published on Amazon.com
Format:Paperback
Overall this book is very good. It is particularly well written and enjoyable to read, as are all of Robert Love's previous books.

However, it's fairly small and could go into more detail. For example, I would have liked a discussion of edge-triggered vs. level-triggered epoll() usage. The author mentions that edge-triggered needs a different programming style. What is it? Is it better? Regarding signal handling, the author hints at injecting signals into the event loop, but how could one do it concretely? On the subject of I/O buffering, not much is said except that standard I/O exists. But I'm here for the meat, and I want to know how to implement my own I/O buffering! Pretty much every chapter ends when the fun is about to begin.

I'm still hungry. Nevertheless, every system programmer for Linux should read this book. I hope for an expanded second edition.
33 of 36 people found the following review helpful
3.0 out of 5 stars a book full of hints, but seldom tells you how to actually do it 22 Nov 2007
By a reader - Published on Amazon.com
Format:Paperback
I have to agree completely with the previous reviewer that this book lacks meat. In this book, after discussing each issue, the author typically hints that there exists a solution, but does not tell you exactly how to implement the solution. The book is sprinkled with snippets of code that are almost always incomplete, and very rarely explained.
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. Perhaps the author did not want readers to compare his book to these two books, because in these two books, every important concept is illustrated with program code examples that are fully compilable, fully working, and fully explained!
The author could make a very significant contribution if only he could follow the examples of the above two books.
37 of 41 people found the following review helpful
1.0 out of 5 stars Not worth money 13 April 2008
By Jaebin Yoon - Published on Amazon.com
Format:Paperback
If you expect the quality of the author's other books from this book, you'll be disappointed. It just lists system calls and their descriptions that you can find from man pages without any serious examples. It doesn't provide any insight or thorough coverage you can find from other books such as Steven's book (Advance Programmng in Unix environment).

From the book title, I expected the author's insight over interface between user space program and kernel but it just looks like that it copied man pages in some order. If you want to learn sysetm programming in Linux environment, look for other books, seriously.
7 of 8 people found the following review helpful
5.0 out of 5 stars The book truly is for all developers 16 May 2008
By howard - Published on Amazon.com
Format:Paperback|Verified Purchase
I have been programming C/C++ professionally since 1986 and was surprised at how much I've learned in the first few chapters.

One of the programs that I've been working on is an I/O intensive conversion from a legacy platform to Linux. The original code took about 8 minutes per gigabyte of data to process. I had worked and squeezed every trick I could think of and got the application down to 10 seconds per gigabyte. From what I learned in just the first few chapters, I was able to knock an additional 3% off the application performance. (It has been mentioned that I should state that I had been unaware of fread_unlocked and fwrite_unlocked before the book ... see comments for more detailed discussion).

When I finish the book, I fully intend on passing it over to one of our junior members so that they can benefit from it.
2 of 2 people found the following review helpful
5.0 out of 5 stars Not necessarily just linux 9 July 2012
By richendes - Published on Amazon.com
Format:Paperback|Verified Purchase
This book, at first glance looks like its only going to be applicable to linux. This isn't the case, it looks more at system level programming; the standard library; for unix including some parts of BSD. Any interface that is only for use on linux is explicitly stated so.

I found this book very easy to read and as other reviews say it mostly just lists the calls and describes them, but it does so very clearly and explains uses for them and the pros and cons of each. For me I got the book so I understood how linux worked under-the-hood and for this, this book does a very good job. It explains how the operating system communicates with the disc, how processes are implemented and how reading and writing onto the disc is optimised for performance and efficiency. I'm only half way though but I'm finding it very insightful and getting more out of it to what I thought I would.
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Look for similar items by category