Linux System Programming: Talking Directly to the Kernel and C Library

Linux System Programming: Talking Directly to the Kernel and C Library

  • Downloads:5975
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2021-03-09 03:16:54
  • Update Date:2025-09-07
  • Status:finish
  • Author:Robert Love
  • ISBN:1449339530
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

Write software that draws directly on services offered by the Linux kernel and core system libraries。 With this comprehensive book, Linux kernel contributor Robert Love provides you with a tutorial on Linux system programming, a reference manual on Linux system calls, and an insider’s guide to writing smarter, faster code。

Love clearly distinguishes between POSIX standard functions and special services offered only by Linux。 With a new chapter on multithreading, this updated and expanded edition provides an in-depth look at Linux from both a theoretical and applied perspective over a wide range of programming topics, including:

A Linux kernel, C library, and C compiler overview
Basic I/O operations, such as reading from and writing to files
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
Thread concepts, multithreaded programming, and Pthreads
File and directory management
Interfaces for allocating memory and optimizing memory access
Basic and advanced signal interfaces, and their role on the system
Clock management, including POSIX clocks and high-resolution timers

Download

Reviews

Bokieie

This had lots of good, practical advice。

Foxtrot

A good introduction to the low-level layers of Linux systems。 Note that this is not a comprehensive approach to how Linux works。 Prior knowledge and experience on Linux systems are advised to take the most out of this reading。 It is a really good book if you hacked your way through Linux and you feel you would be more efficient if you knew how things actually work under the hood。It provides a good illustration of the Linux everything is a file philosophy by describing the consequences of various A good introduction to the low-level layers of Linux systems。 Note that this is not a comprehensive approach to how Linux works。 Prior knowledge and experience on Linux systems are advised to take the most out of this reading。 It is a really good book if you hacked your way through Linux and you feel you would be more efficient if you knew how things actually work under the hood。It provides a good illustration of the Linux everything is a file philosophy by describing the consequences of various system calls on different kind of files (e。g。 regular files or devices won't behave similarly)Even with this 429 pages, it is a really quick book to read。 Even if it is a technical read, it doesn't go into highly theoretical concepts and thus, it is a perfectly valid candidate for your next commute read。 Expect to finish it in less than two weeks if you grab it with you while commuting。The code illustrating the system calls are in C but the code snippets are very short and understandable for developer unfamiliar with the C programming language。The main topics covered in this book are: - Introduction to the process of reading/writing data from/to the disk - Process management and signalsNote that those topics are mainly illustrated by studying C functions of standard libraries。 But again, that should not be a stop if you are not familiar with C since the snippets are short and very well explained。 A good point for this book is that it teaches you notions that will empower you to monitor Linux systems more efficiently。 Especially the parts about processes and memory management。 e。g。You often encounter memory leaks on your machine and don't know why? The book introduces you to zombie processes how they spawn and what can be done about them。 Another nice thing about this book is that it provides you with some very low-level insights on software/hardware interaction, especially the part about writing data to memory。 You will learn plenty of things about the various steps of writing information to the disk。 Being knowledgable on this topic proved to be very helpful to help me understand challenges related to database related topics (e。g。concurrency and consistency)。 。。。more

Diego Pino

I think this is one of the best books, if not the best, about systems programming in Linux (FWIW, I'm not aware of any other book in the same category)。 By systems programming we understand programming that requires services provided by the Linux kernel, which usually are satisfied via system calls。 The book is categorized in chapters, each chapter covering a topic (I/O, threading, memory management, process management, etc) and a good share of system calls。 Examples are also provided。I have to I think this is one of the best books, if not the best, about systems programming in Linux (FWIW, I'm not aware of any other book in the same category)。 By systems programming we understand programming that requires services provided by the Linux kernel, which usually are satisfied via system calls。 The book is categorized in chapters, each chapter covering a topic (I/O, threading, memory management, process management, etc) and a good share of system calls。 Examples are also provided。I have to confess it took me a while to finish this book。 I think the main reason is that when I started to read it I was mainly interested in learning about a few aspects of Linux (CPU affinity, sockets and signals), but somehow I kept reading the whole book until I completed it。I found the general explanations of each chapter interesting and I think those ones are a good read even if you're not interested in the programming specifics。 Going down on the details of something I was not really interested made me wonder sometimes of how much value it was for me, as I would forget about what I just learned rather quickly。 So in hindsight, I think this book is two things: a reference book for systems programming and a general book about concepts related with an OS, specifically the Linux OS。 If you're interested, or need to learn, about the programming specifics, go ahead and read the whole chapter。 If you want to refresh or broaden your knowledge about a topic, read the introductory explanations。 Also, since the book is structured in chapters, it's not necessary to read the book from cover to cover。 Read simply what you need。On the other hand, there are a few things I didn't like about the book and perhaps could be improved in future editions。 I think, as it was pointed out in other reviews, the details about error handling described for each system call are excessive。 This type of information can be easily retrieved from man pages。 In addition, I found the examples too much simple。 Most of them consist of calls to a specific system call with some argument management。 I think providing code examples that solve real-world problems could be more illustrative on how system calls can be used and could even help to spark some creativity on the learning reader。Lastly, as the kernel keeps evolving and new aspects and new systems calls get incorporated into the Linux kernel I think a new edition of this book would be gladly welcomed。 。。。more

Tuấn Anh Nguyễn

Good concise introduction。 For references, Linux Programming Interface is more comprehensive。

Emma

Great book about how Linux works under the hood。Perhaps a bit low level to be directly relevant to TC but really helped my overall understanding of Linux as an OS

Nicky Lim

Good reference book。 Will be useful by your side when doing systems programming。 Appendix A offers some extensions to C for optimization and appendix B suggest some great material for subsequent reading。

Paul

Странная книжка: подробно разжёвываются очень очевидные вещи вроде известных по K&R вызовов, которые есть в стандарте, в то время как более специфические моменты рассказаны вскользь。 Перевод корявый。 Примерно через год надо будет перечитать, т。к。 для запоминания одного прочтения мало。

lehaleha

It started well, became a bit boring to the end, but it's book about API after all, not exactly action-packed topic :) It does its job well。 It started well, became a bit boring to the end, but it's book about API after all, not exactly action-packed topic :) It does its job well。 。。。more

Bhaskar Chowdhury

This book and the other title Linux Kernel Development shaped/wrap my mind around the process and to know the inner working of the system in more details。 It was fascinating and invigorating to read such a wonderfully written book on such a complex system。 Thank you Robert, your books make my understanding of my beloived subject more intriguing and interesting。My understanding of the subject solidified by your books。 A kudo is not enough for you , but you deserve more。

Murray Cumming

This book was a great chance for me to become more familiar with a lower level of Linux programming, which I usually manage to avoid unless absolutely necessary。 I've gained a sense of the APIs used by system level software, such as daemons and services。 I've also realized what extra tricks are available even to a regular application that wants to ask the Linux kernel to optimize for its own behaviour when dealing with large amounts of memory or lots of I/O。After the excellent introduction, it b This book was a great chance for me to become more familiar with a lower level of Linux programming, which I usually manage to avoid unless absolutely necessary。 I've gained a sense of the APIs used by system level software, such as daemons and services。 I've also realized what extra tricks are available even to a regular application that wants to ask the Linux kernel to optimize for its own behaviour when dealing with large amounts of memory or lots of I/O。After the excellent introduction, it becomes a bit like a reference manual, but it's worth reading from cover to cover。 I do wish that there had been more discussion of which API is standard in the C library, or which is a glibc extra, which is a Linux system call, or which is extra API in a Linux header that's not a system call。I really appreciate that the writing was straightforward and direct, telling you the practical details。 There's no hand waving here。 。。。more

Dee

Highly readable, entirely useful。O'Reilly books tend to have a very high standard of clarity and general smartness and accuracy。 This book was no surprise。With nonfiction and technical writing it is always a pleasure to find what you were seeking and then to find some more, which you didn't even know you wanted to know。As an intermediate programmer who is interested in systems programming in the C language, I am utterly satisfied by this book Highly readable, entirely useful。O'Reilly books tend to have a very high standard of clarity and general smartness and accuracy。 This book was no surprise。With nonfiction and technical writing it is always a pleasure to find what you were seeking and then to find some more, which you didn't even know you wanted to know。As an intermediate programmer who is interested in systems programming in the C language, I am utterly satisfied by this book 。。。more

br

"В наборе компиляторов GNU (DNU Compiler Connection, GCC)"Качество перевода, количество опечаток и отсутствие редактуры удручает。 По возможности избегайте книг, изданных издательством "Питер"。 "В наборе компиляторов GNU (DNU Compiler Connection, GCC)"Качество перевода, количество опечаток и отсутствие редактуры удручает。 По возможности избегайте книг, изданных издательством "Питер"。 。。。more

Edward Llewellyn

A very readable book for a programming manual - he not only goes over the API, but has well thought out suggestions as to when or how you should use particular programming interfaces, as well as which ones are most portable。He also gets into some of the internals of the latest Linux version so you can write efficient programs for your applications。

Alex

Almost no fluff, very detailed and at the same time not that huge in confront to Rich Steven's book。 Great syscalls and low level linux design explained from one of the kernel devs。 Linux Kernel Development is another his book which is already in my reading queue。 Almost no fluff, very detailed and at the same time not that huge in confront to Rich Steven's book。 Great syscalls and low level linux design explained from one of the kernel devs。 Linux Kernel Development is another his book which is already in my reading queue。 。。。more

Tudor Ștefănescu

some good insights about the internal stuff that happens behind the standard library calls。

Sherif Shehab

It's the best book ever when It comes about Linux internals, stuff like Multi threading, timers, IPC is perfectly explained in this book。 It's the best book ever when It comes about Linux internals, stuff like Multi threading, timers, IPC is perfectly explained in this book。 。。。more

Arun

I really loved Love's Linux Kernel Development (LKD) book (I have read it couple of times) and I read this book in delirium immediately after I gobbled up the LKD book。 This books can be kept as a reference on Linux system programming and one has to go to it periodically to check up facts while doing coding。 In a way it is most helpful when u have a computer handy so u can type the example programs side by side while u read from the book (I didn't do it that way!)。 From my own investigation ther I really loved Love's Linux Kernel Development (LKD) book (I have read it couple of times) and I read this book in delirium immediately after I gobbled up the LKD book。 This books can be kept as a reference on Linux system programming and one has to go to it periodically to check up facts while doing coding。 In a way it is most helpful when u have a computer handy so u can type the example programs side by side while u read from the book (I didn't do it that way!)。 From my own investigation there are other competent books in this space like Stephen Rago's updated "Advanced unix programming" and "The Linux Programming Interface: A Linux and UNIX System Programming Handbook" by Michael Kerrisk (which is showing no #1 in Amazon best seller ratings) but if you like the tone/pace/depth of Love's writing (which I do) then this is the book for ya'。 。。。more

Kirill

Для новичка в Linux типа меня по-моему вполне дельно, пусть и слишком много пересказов манов

Paul Ivanov

A wonderful way to dive into systems programming and start getting a handle on the standard things the kernel does for you。 Though Linux is in the title, Robert Love does a good job of covering the commonalities and departures from other unix-like systems out there。 Parts of the book read a bit too much like man pages (I tended to mostly skip the paragraph long descriptions of each possible errno that can be set by each new call - that'd be useful as a reference, but not on your initial read-thr A wonderful way to dive into systems programming and start getting a handle on the standard things the kernel does for you。 Though Linux is in the title, Robert Love does a good job of covering the commonalities and departures from other unix-like systems out there。 Parts of the book read a bit too much like man pages (I tended to mostly skip the paragraph long descriptions of each possible errno that can be set by each new call - that'd be useful as a reference, but not on your initial read-through。 On the other hand, the examples (of which there are plenty) really help in getting a concrete (and practical) understanding of what the calls do。 。。。more

Steve

A very clear, if sometimes excessive look through systems programming on Linux。 I think many of the individual functions and flags that weren't being discussed in-depth could have been left for the reader to dig through the man page。Other than that, I definitely recommend it。 A very clear, if sometimes excessive look through systems programming on Linux。 I think many of the individual functions and flags that weren't being discussed in-depth could have been left for the reader to dig through the man page。Other than that, I definitely recommend it。 。。。more