Linux设备驱动程序

科波特

出版时间

2005-12-31

ISBN

9787508338637

评分

★★★★★
书籍介绍
这本书最独特的价值,在于它不满足于教你调用接口,而是带你理解内核究竟是如何与硬件协作的。作者本身就是Linux内核的维护者与社区核心,书中对并发、竞态、内存分配、I/O通信等难点的处理,透着“过来人”的清醒——它会明确指出scull示例的缺陷、锁的陷阱,以及del_gendisk之后结构体仍可能被调用的隐患。读者记住它,往往不是因为某个API,而是因为那种“从驱动模型的视角理解完整驱动”的思维方式。需要提醒的是:本书面向2.6.10内核,大量接口已过时,PCI、USB等章节对零基础者并不友好;真正适合的是愿意自己动手把示例更新到现代内核、并借此吃透内核机制的读者。
作者简介
Jonahan Corbet早在1981年就开始接触BSD Unix的源代码。那时,科罗拉多大学的一名讲师让他“修正”其中的分页算法。从那时起直到现在。他深入研究了他所遇到的每一个系统,其中包括VAX、Sun、Arden以及x86系统的驱动程序。他在1993年第一次接触Linux系统,从此以后一直从事Linux的开发。Corbet先生是《Linux Weekly News》的创始人和执行主编。他和妻子及两个孩子生活在科罗多州的玻尔得市。
AI导读
核心看点
  • Linux内核驱动开发经典指南
  • 涵盖字符块设备及PCI USB子系统
  • 深入解析内核并发与内存管理
读者共识
  • 驱动入门必读经典著作
  • 中文翻译质量有待提升
  • 内容较深需一定内核基础
精彩摘录
  • "GFP_ATOMIC Used to allocate memory from interrupt handlers and other code outside of a process context. Never sleeps. GFP_KERNEL Normal allocation of kernel memory. May sleep."
  • "struct gendisk is a dynamically allocated structure that requires special kernel manipulation to be initialized; drivers cannot allocate the structure on their own. Instead, you must call:"
  • "The minors argument should be the number of minor numbers this disk uses; note that you cannot change the minors field later and expect things to work properly. When a disk is no longer needed, it should be freed with:"
  • "A gendisk is a reference-counted structure (it contains a kobject). There are get_disk and put_disk functions available to manipulate the reference count, but drivers should never need to do that. Normally, the call to del_gendisk removes the final reference to a gendisk, but there are no guarantees"
  • "But this book is also about how the Linux kernel works and how to adapt its workings to your needs or interests."
  • "My hope is that this edition helps to bring that fun and opportunity to a new set of Linux developers. Whether your interests are in the kernel or in user space, I hope you find this book to be a useful and interesting guide to just how the kernel works with the hardware."
  • "I am honored that I’ve had the ability to contribute to this book. I hope that it enables others to learn the details about the kernel, discover that driver development is not a scary or forbidding place, and possibly encourage others to join in and help in the collective effort of making this opera"
  • "We hope this book is useful as a starting point for people who want to become kernel hackers but don’t know where to start."
目录
前言
第一章 设备驱动程序简介
设备驱动程序的作用
内核功能划分
设备和模块的分类

显示全部
用户评论
大四毕设时读的
算是理解Linux内核必读的书了
书的内容是不错,但中文翻译实在是不敢恭维
原文精彩,看了前几章,翻译的也不错。很优秀的图书。
我读过最简单易懂的内核的书,不过都是api的详细介绍
有点老
有一说一,翻译的挺垃圾的
1023更新——看完了,不过有些章节已经过时 翻译得太垃圾了,可以换几个人翻译吗?!!!
这书刚工作的时候读的,感觉比较老了,然后内容写的既不详细又不全。这书应该是早些年代资料缺乏时候比较珍贵的参考书,但是在现在资料这么多的情况下感觉这本并不是必读书了,看这个还不如看宋宝华老师的那本。
我能力有限,不过感觉翻译的也有问题,以后有机会再看一遍吧。
求书
收藏