出版時(shí)間:2008-3 出版社:東南大學(xué) 作者:洛夫 頁數(shù):368
Tag標(biāo)簽:無
內(nèi)容概要
在某些時(shí)刻,幾乎所有的程序員都要與其程序所處操作系統(tǒng)中的系統(tǒng)調(diào)用和程序庫打交道。本書主要討論如何編寫Linux系統(tǒng)軟件——代碼位于底層,并且直接跟內(nèi)核及核心系統(tǒng)程序庫對(duì)話。《Linux系統(tǒng)編程》描述了使用標(biāo)準(zhǔn)接口包括使用Linux獨(dú)有的高級(jí)接口時(shí),在功能和性能之間如何進(jìn)行權(quán)衡取舍的策略。 該書同樣也是一本內(nèi)行人士編寫靈活高效代碼的學(xué)習(xí)指南。作為內(nèi)核黑客和本書的作者,RobertLove不僅闡釋了系統(tǒng)接口應(yīng)該如何工作,還介紹了它們實(shí)際上是如何工作的,以及怎樣安全有效地使用它們?!禠inux系統(tǒng)編程》包含了幫助你在任何層面編寫更佳代碼的實(shí)用技巧。 本書主題包括: 讀寫文件以及其他文件I/O操作,包括Linux內(nèi)核如何實(shí)現(xiàn)和管理文件I/O,內(nèi)存映射與優(yōu)化技術(shù); 進(jìn)程管理的系統(tǒng)調(diào)用,包括實(shí)時(shí)進(jìn)程; 文件與目錄——?jiǎng)?chuàng)建、移動(dòng)、復(fù)制、刪除和管理; 內(nèi)存管理——內(nèi)存分配接口,管理內(nèi)存,以及優(yōu)化內(nèi)存訪問; 信號(hào)及其在unix系統(tǒng)中的角色,以及基本和高級(jí)信號(hào)接口; 時(shí)間、休眠和時(shí)鐘管理,從基礎(chǔ)開始講述,并且涵蓋POSIX時(shí)鐘和高精度計(jì)時(shí)器擁有《Linux系統(tǒng)編程》,你將從理論和應(yīng)用的角度深入了解Linux,可以最大限度地利用系統(tǒng)的潛能。
作者簡介
Robert Love很早就成為一位Linux用戶和黑客。他一直并且充滿激情地活躍在Linux內(nèi)核與GNOME桌面社區(qū)之中。他近來為Linux內(nèi)核作出的貢獻(xiàn)包括內(nèi)核事件層方面的工作以及inotify,GNOME相關(guān)的貢獻(xiàn)包括Beagle、GNOME卷管理器、網(wǎng)絡(luò)管理器以及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
圖書封面
圖書標(biāo)簽Tags
無
評(píng)論、評(píng)分、閱讀與下載