My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
Linux System Programming
Talking Directly to the Kernel and C Library
By
Robert Love
September 2007
Pages: 388
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Chapter 1
Introduction and Essential Concepts
System Programming
APIs and ABIs
Standards
Concepts of Linux Programming
Getting Started with System Programming
Chapter 2
File I/O
Opening Files
Reading via read( )
Writing with write( )
Synchronized I/O
Direct I/O
Closing Files
Seeking with lseek( )
Positional Reads and Writes
Truncating Files
Multiplexed I/O
Kernel Internals
Conclusion
Chapter 3
Buffered I/O
User-Buffered I/O
Standard I/O
Opening Files
Opening a Stream via File Descriptor
Closing Streams
Reading from a Stream
Writing to a Stream
Sample Program Using Buffered I/O
Seeking a Stream
Flushing a Stream
Errors and End-of-File
Obtaining the Associated File Descriptor
Controlling the Buffering
Thread Safety
Critiques of Standard I/O
Conclusion
Chapter 4
Advanced File I/O
Scatter/Gather I/O
The Event Poll Interface
Mapping Files into Memory
Advice for Normal File I/O
Synchronized, Synchronous, and Asynchronous Operations
I/O Schedulers and I/O Performance
Conclusion
Chapter 5
Process Management
The Process ID
Running a New Process
Terminating a Process
Waiting for Terminated Child Processes
Users and Groups
Sessions and Process Groups
Daemons
Conclusion
Chapter 6
Advanced Process Management
Process Scheduling
Yielding the Processor
Process Priorities
Processor Affinity
Real-Time Systems
Resource Limits
Chapter 7
File and Directory Management
Files and Their Metadata
Directories
Links
Copying and Moving Files
Device Nodes
Out-of-Band Communication
Monitoring File Events
Chapter 8
Memory Management
The Process Address Space
Allocating Dynamic Memory
Managing the Data Segment
Anonymous Memory Mappings
Advanced Memory Allocation
Debugging Memory Allocations
Stack-Based Allocations
Choosing a Memory Allocation Mechanism
Manipulating Memory
Locking Memory
Opportunistic Allocation
Chapter 9
Signals
Signal Concepts
Basic Signal Management
Sending a Signal
Reentrancy
Signal Sets
Blocking Signals
Advanced Signal Management
Sending a Signal with a Payload
Conclusion
Chapter 10
Time
Time's Data Structures
POSIX Clocks
Getting the Current Time of Day
Setting the Current Time of Day
Playing with Time
Tuning the System Clock
Sleeping and Waiting
Timers
Appendix
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
Colophon
Return to
Linux System Programming