出版时间:2008-3 出版社:东南大学 作者:洛夫 页数:368
Tag标签:无
内容概要
在某些时刻,几乎所有的程序员都要与其程序所处操作系统中的系统调用和程序库打交道。本书主要讨论如何编写Linux系统软件——代码位于底层,并且直接跟内核及核心系统程序库对话。《Linux系统编程》描述了使用标准接口包括使用Linux独有的高级接口时,在功能和性能之间如何进行权衡取舍的策略。 该书同样也是一本内行人士编写灵活高效代码的学习指南。作为内核黑客和本书的作者,RobertLove不仅阐释了系统接口应该如何工作,还介绍了它们实际上是如何工作的,以及怎样安全有效地使用它们。《Linux系统编程》包含了帮助你在任何层面编写更佳代码的实用技巧。 本书主题包括: 读写文件以及其他文件I/O操作,包括Linux内核如何实现和管理文件I/O,内存映射与优化技术; 进程管理的系统调用,包括实时进程; 文件与目录——创建、移动、复制、删除和管理; 内存管理——内存分配接口,管理内存,以及优化内存访问; 信号及其在unix系统中的角色,以及基本和高级信号接口; 时间、休眠和时钟管理,从基础开始讲述,并且涵盖POSIX时钟和高精度计时器拥有《Linux系统编程》,你将从理论和应用的角度深入了解Linux,可以最大限度地利用系统的潜能。
作者简介
Robert Love很早就成为一位Linux用户和黑客。他一直并且充满激情地活跃在Linux内核与GNOME桌面社区之中。他近来为Linux内核作出的贡献包括内核事件层方面的工作以及inotify,GNOME相关的贡献包括Beagle、GNOME卷管理器、网络管理器以及Project utopia等。目前,Roberlt供职于Google开源软件办公室。
书籍目录
ForewordPreface1. Introduction and Essential Concepts System Programming APIs and ABIs Standards Concepts of Linux Programming Getting Started with Syster~ Programming2. 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 Conclusion3. Buffered I/0 User-Buffered I/0 Standard I/0 Opening Files Opening a Stream via File Descriptor Closing Streams Reading from a Stream Writing to a Stream Sample Program Using Buffered I/0 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/0 Conclusion4. Advanced File I/0 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 Conclusion5. 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 Conclusion6. Advanced Process Management Process Scheduling Yielding the Processor Process Priorities Processor Affinity Real-Time Systems Resource Limits7. Fileand Directory Management Files and Their Metadata Directories Links Copying and Moving Files Device Nodes Out-of-Band Communication Monitoring File Events8. 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 Allocation9. Signals Signal Concepts Basic Signal Management Sending a Signal Reentrancy Signal Sets Blocking Signals Advanced Signal Management Sending a Signal with a Payload Conclusion10. 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 TimersAppendix. GCC Extensions to the C LanguageBibliographyIndex
图书封面
图书标签Tags
无
评论、评分、阅读与下载