Buying Options
Linux System Programming
Print $49.99
Add to Cart
Print+Ebook $54.99
Add to Cart
Ebook $39.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £38.50
Add to Cart
What is this?
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
Table of Contents
  1. Chapter 1 Introduction and Essential Concepts

    1. System Programming

    2. APIs and ABIs

    3. Standards

    4. Concepts of Linux Programming

    5. Getting Started with System Programming

  2. Chapter 2 File I/O

    1. Opening Files

    2. Reading via read( )

    3. Writing with write( )

    4. Synchronized I/O

    5. Direct I/O

    6. Closing Files

    7. Seeking with lseek( )

    8. Positional Reads and Writes

    9. Truncating Files

    10. Multiplexed I/O

    11. Kernel Internals

    12. Conclusion

  3. Chapter 3 Buffered I/O

    1. User-Buffered I/O

    2. Standard I/O

    3. Opening Files

    4. Opening a Stream via File Descriptor

    5. Closing Streams

    6. Reading from a Stream

    7. Writing to a Stream

    8. Sample Program Using Buffered I/O

    9. Seeking a Stream

    10. Flushing a Stream

    11. Errors and End-of-File

    12. Obtaining the Associated File Descriptor

    13. Controlling the Buffering

    14. Thread Safety

    15. Critiques of Standard I/O

    16. Conclusion

  4. Chapter 4 Advanced File I/O

    1. Scatter/Gather I/O

    2. The Event Poll Interface

    3. Mapping Files into Memory

    4. Advice for Normal File I/O

    5. Synchronized, Synchronous, and Asynchronous Operations

    6. I/O Schedulers and I/O Performance

    7. Conclusion

  5. Chapter 5 Process Management

    1. The Process ID

    2. Running a New Process

    3. Terminating a Process

    4. Waiting for Terminated Child Processes

    5. Users and Groups

    6. Sessions and Process Groups

    7. Daemons

    8. Conclusion

  6. Chapter 6 Advanced Process Management

    1. Process Scheduling

    2. Yielding the Processor

    3. Process Priorities

    4. Processor Affinity

    5. Real-Time Systems

    6. Resource Limits

  7. Chapter 7 File and Directory Management

    1. Files and Their Metadata

    2. Directories

    3. Links

    4. Copying and Moving Files

    5. Device Nodes

    6. Out-of-Band Communication

    7. Monitoring File Events

  8. Chapter 8 Memory Management

    1. The Process Address Space

    2. Allocating Dynamic Memory

    3. Managing the Data Segment

    4. Anonymous Memory Mappings

    5. Advanced Memory Allocation

    6. Debugging Memory Allocations

    7. Stack-Based Allocations

    8. Choosing a Memory Allocation Mechanism

    9. Manipulating Memory

    10. Locking Memory

    11. Opportunistic Allocation

  9. Chapter 9 Signals

    1. Signal Concepts

    2. Basic Signal Management

    3. Sending a Signal

    4. Reentrancy

    5. Signal Sets

    6. Blocking Signals

    7. Advanced Signal Management

    8. Sending a Signal with a Payload

    9. Conclusion

  10. Chapter 10 Time

    1. Time's Data Structures

    2. POSIX Clocks

    3. Getting the Current Time of Day

    4. Setting the Current Time of Day

    5. Playing with Time

    6. Tuning the System Clock

    7. Sleeping and Waiting

    8. Timers

  1. Appendix GCC Extensions to the C Language

    1. GNU C

    2. Inline Functions

    3. Suppressing Inlining

    4. Pure Functions

    5. Constant Functions

    6. Functions That Do Not Return

    7. Functions That Allocate Memory

    8. Forcing Callers to Check the Return Value

    9. Marking Functions As Deprecated

    10. Marking Functions As Used

    11. Marking Functions or Parameters As Unused

    12. Packing a Structure

    13. Increasing the Alignment of a Variable

    14. Placing Global Variables in a Register

    15. Branch Annotation

    16. Getting the Type of an Expression

    17. Getting the Alignment of a Type

    18. The Offset of a Member Within a Structure

    19. Obtaining the Return Address of a Function

    20. Case Ranges

    21. Void and Function Pointer Arithmetic

    22. More Portable and More Beautiful in One Fell Swoop

  2. Bibliography

  3. Colophon

View Full Table of Contents
Product Details
Title:
Linux System Programming
By:
Robert Love
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
September 2007
Ebook Release:
February 2009
Pages:
400
Print ISBN:
978-0-596-00958-8
| ISBN 10:
0-596-00958-5
Ebook ISBN:
978-0-596-15923-8
| ISBN 10:
0-596-15923-4
Customer Reviews
About the Author
  1. Robert Love

    Robert Love has been a Linux user and hacker since the early days. He is active in, and passionate about, both 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.

    As an author, Robert is responsible for Linux Kernel Development (SAMS), now in its second edition, and Linux System Programming (O'Reilly). He is also a coauthor of the fifth edition of O'Reilly's Linux in a Nutshell. He's a Contributing Editor for Linux Journal, has written numerous articles, and has been invited to speak around the world on Linux.

    Robert graduated from the University of Florida with a B.A. in Mathematics and a B.S. in Computer Science. Hailing from South Florida, he currently calls Boston home.

    View Robert Love's full profile page.

Colophon

The image on the cover of Linux System Programming is a man in a flying machine. Well before the Wright brothers achieved their first controlled heavier-than-air flight in 1903, people around the world attempted to fly by simple and elaborate machines. In the second or third century, Zhuge Liang of China reportedly flew in a Kongming lantern, the first hot air balloon. Around the fifth or sixth centuries, many Chinese people purportedly attached themselves to large kites to fly through the air.

It is also said that the Chinese created spinning toys that were early versions of helicopters, the designs of which may have inspired Leonardo da Vinci in his initial attempts at a solution to human flight. da Vinci also studied birds and designed parachutes, and in 1845, he designed an ornithopter, a wing-flapping machine meant to carry humans through the air. Though he never built it, the ornithopter's birdlike structure influenced the design of flying machines throughout the centuries.

The flying machine depicted on the cover is more elaborate than James Means' model soaring machine of 1893, which had no propellers. Means later printed an instruction manual for his soaring machine, which in part states that "the summit of Mt. Willard, near the Crawford House, N.H., will be found an excellent place" to experiment with the machines.

But such experimentation was often dangerous. In the late nineteenth century, Otto Lilienthal built monoplanes, biplanes, and gliders. He was the first to show that control of human flight was within reach, and he gained the nickname "father of aerial testing," as he conducted more than 2,000 glider flights, sometimes traveling more than a thousand feet. He died in 1896 after breaking his spine during a crash landing.

Flying machines are also known as mechanical birds and airships, and are occasionally called by more colorful names such as the Artificial Albatross. Enthusiasm for flying machines remains high, as aeronautical buffs still build early flying machines today.

The cover image and chapter opening graphics are from the Dover Pictorial Archive. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.

  • Book cover of Linux System Programming