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

Overview

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

See more details below
Paperback (Second Edition)
$38.69
BN.com price
(Save 35%)$59.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (16) from $31.85   
  • New (12) from $31.85   
  • Used (4) from $31.85   
Linux System Programming: Talking Directly to the Kernel and C Library

Available on NOOK devices and apps  
  • NOOK Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$29.49
BN.com price
(Save 42%)$50.99 List Price

Overview

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
Read More Show Less

Product Details

  • ISBN-13: 9781449339531
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 6/4/2013
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 456
  • Sales rank: 340,740
  • Product dimensions: 7.00 (w) x 9.10 (h) x 1.10 (d)

Meet the Author

Robert Love has been a Linux user and hacker since the early days. He is active in—and passionate about—the Linux kernel and GNOME desktop communities. His recent contributions to the Linux kernel include work on the kernel event layer and inotify. GNOME-related contributions include Beagle, GNOME Volume Manager, NetworkManager, and Project Utopia. Currently, Robert works in the Open Source Program Office at Google.

Read More Show Less

Table of Contents

Dedication;
Foreword;
Preface;
Audience and Assumptions;
Contents of This Book;
Versions Covered in This Book;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Chapter 1: Introduction and Essential Concepts;
1.1 System Programming;
1.2 APIs and ABIs;
1.3 Standards;
1.4 Concepts of Linux Programming;
1.5 Getting Started with System Programming;
Chapter 2: File I/O;
2.1 Opening Files;
2.2 Reading via read();
2.3 Writing with write();
2.4 Synchronized I/O;
2.5 Direct I/O;
2.6 Closing Files;
2.7 Seeking with lseek();
2.8 Positional Reads and Writes;
2.9 Truncating Files;
2.10 Multiplexed I/O;
2.11 Kernel Internals;
2.12 Conclusion;
Chapter 3: Buffered I/O;
3.1 User-Buffered I/O;
3.2 Standard I/O;
3.3 Opening Files;
3.4 Opening a Stream via File Descriptor;
3.5 Closing Streams;
3.6 Reading from a Stream;
3.7 Writing to a Stream;
3.8 Sample Program Using Buffered I/O;
3.9 Seeking a Stream;
3.10 Flushing a Stream;
3.11 Errors and End-of-File;
3.12 Obtaining the Associated File Descriptor;
3.13 Controlling the Buffering;
3.14 Thread Safety;
3.15 Critiques of Standard I/O;
3.16 Conclusion;
Chapter 4: Advanced File I/O;
4.1 Scatter/Gather I/O;
4.2 Event Poll;
4.3 Mapping Files into Memory;
4.4 Advice for Normal File I/O;
4.5 Synchronized, Synchronous, and Asynchronous Operations;
4.6 I/O Schedulers and I/O Performance;
4.7 Conclusion;
Chapter 5: Process Management;
5.1 Programs, Processes, and Threads;
5.2 The Process ID;
5.3 Running a New Process;
5.4 Terminating a Process;
5.5 Waiting for Terminated Child Processes;
5.6 Users and Groups;
5.7 Sessions and Process Groups;
5.8 Daemons;
5.9 Conclusion;
Chapter 6: Advanced Process Management;
6.1 Process Scheduling;
6.2 The Completely Fair Scheduler;
6.3 Yielding the Processor;
6.4 Process Priorities;
6.5 Processor Affinity;
6.6 Real-Time Systems;
6.7 Resource Limits;
Chapter 7: Threading;
7.1 Binaries, Processes, and Threads;
7.2 Multithreading;
7.3 Threading Models;
7.4 Threading Patterns;
7.5 Concurrency, Parallelism, and Races;
7.6 Synchronization;
7.7 Pthreads;
7.8 Further Study;
Chapter 8: File and Directory Management;
8.1 Files and Their Metadata;
8.2 Directories;
8.3 Links;
8.4 Copying and Moving Files;
8.5 Device Nodes;
8.6 Out-of-Band Communication;
8.7 Monitoring File Events;
Chapter 9: Memory Management;
9.1 The Process Address Space;
9.2 Allocating Dynamic Memory;
9.3 Managing the Data Segment;
9.4 Anonymous Memory Mappings;
9.5 Advanced Memory Allocation;
9.6 Debugging Memory Allocations;
9.7 Stack-Based Allocations;
9.8 Choosing a Memory Allocation Mechanism;
9.9 Manipulating Memory;
9.10 Locking Memory;
9.11 Opportunistic Allocation;
Chapter 10: Signals;
10.1 Signal Concepts;
10.2 Basic Signal Management;
10.3 Sending a Signal;
10.4 Reentrancy;
10.5 Signal Sets;
10.6 Blocking Signals;
10.7 Advanced Signal Management;
10.8 Sending a Signal with a Payload;
10.9 A Flaw in Unix?;
Chapter 11: Time;
11.1 Time’s Data Structures;
11.2 POSIX Clocks;
11.3 Getting the Current Time of Day;
11.4 Setting the Current Time of Day;
11.5 Playing with Time;
11.6 Tuning the System Clock;
11.7 Sleeping and Waiting;
11.8 Timers;
GCC Extensions to the C Language;
GNU C;
Inline Functions;
Suppressing Inlining;
Pure Functions;
Constant Functions;
Functions That Do Not Return;
Functions That Allocate Memory;
Forcing Callers to Check the Return Value;
Marking Functions as Deprecated;
Marking Functions as Used;
Marking Functions or Parameters as Unused;
Packing a Structure;
Increasing the Alignment of a Variable;
Placing Global Variables in a Register;
Branch Annotation;
Getting the Type of an Expression;
Getting the Alignment of a Type;
The Offset of a Member Within a Structure;
Obtaining the Return Address of a Function;
Case Ranges;
Void and Function Pointer Arithmetic;
More Portable and More Beautiful in One Fell Swoop;
Bibliography;
Books on the C Programming Language;
Books on Linux Programming;
Books on the Linux Kernel;
Books on Operating System Design;
Index;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted April 14, 2008

    Top Notch Reference

    Linux System Programming is a top notch reference in the witty and educating style of the author's other book. I learned a lot on my first pass and continue to refer to it as a reference on many followup reads.

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)