Linux System Programming
Publisher: O'Reilly Media
Published: 2009
Place of publication: Sebastopol
Language: eng
Format: electronic resource
Number of pages: 400
ISBN-13: 9780596555139
Subjects: Computer science
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.
Notes: Description based upon print version of record.

Access available to onsite users at SLQ, e-services members and Queensland public library (QPL) account holders.
Table of contents: title: Linux System Programming; Preface; Contents of This Book; Versions Covered in This Book; Conventions Used in This Book; Safari® Books Online; Using Code Examples; How to Contact Us; Acknowledgments; 1. Introduction and Essential Concepts; The C Library; The C Compiler; Apis and Abis; Abis; Standards; C Language Standards; Linux and the Standards; This Book and the Standards; Concepts of Linux Programming; Directories and links; Hard links; Symbolic links; Special files; Filesystems and namespaces; Processes; Process hierarchy; Users and Groups; Permissions; Signals; Interprocess Communication.; title: HeadersError Handling; Getting Started with System Programming; 2. File I/O; Owners of New Files; Permissions of New Files; The creat( ) Function; Return Values and Error Codes; Reading via read( ); Reading All the Bytes; Nonblocking Reads; Other Error Values; Size Limits on read( ); Writing with write( ); Append Mode; Nonblocking Writes; Other Error Codes; Size Limits on write( ); Behavior of write( ); Synchronized I/O; sync( ); The O_Sync Flag; O_Dsync and O_Rsync; Direct I/O; Closing Files; Seeking with lseek( ); Error Values; Limitations; Positional Reads and Writes; Truncating Files.; title: Multiplexed I/Oselect( ) example; Portable sleeping with select( ); pselect( ); poll( ); poll( ) example; ppoll( ); poll( ) Versus select( ); Kernel Internals; The Page Cache; Page Writeback; Conclusion; 3. Buffered I/O; Standard I/O; Opening Files; Opening a Stream via File Descriptor; Closing Streams; Reading from a Stream; Reading an Entire Line; Reading Binary Data; Writing to a Stream; Writing a String of Characters; Writing Binary Data; Sample Program Using Buffered I/O; Seeking a Stream; Flushing a Stream; Errors and End-of-File; Obtaining the Associated File Descriptor.; title: Controlling the BufferingThread Safety; Unlocked Stream Operations; Critiques of Standard I/O; Conclusion; 4. Advanced File I/O; writev( ) example; readv( ) example; Implementation; The Event Poll Interface; Controlling Epoll; Waiting for Events with Epoll; Edge- Versus Level-Triggered Events; Mapping Files into Memory; getpagesize( ); Page_Size; Return values and error codes; Associated signals; munmap( ); Mapping Example; Advantages of mmap( ); Disadvantages of mmap( ); Resizing a Mapping; Changing the Protection of a Mapping; Synchronizing a File with a Mapping; Giving Advice on a Mapping.; title: Advice for Normal File I/Othe readahead( ) System Call; Advice Is Cheap; Synchronized, Synchronous, and Asynchronous Operations; I/O Schedulers and I/O Performance; The Life of an I/O Scheduler; Helping Out Reads; The Anticipatory I/O Scheduler; The Cfq I/O Scheduler; The Noop I/O Scheduler; Selecting and Configuring Your I/O Scheduler; Optimizing I/O Performance; Sorting by inode; Sorting by physical block; Conclusion; 5. Process Management; The Process Hierarchy; pid_t; Obtaining the Process Id and Parent Process Id; Running a New Process; Error values; The fork( ) System Call; vfork( ); title: Terminating a Process.