This book is written in a very approachable style that starts off with a very simple software-only character driver and builds up to more complicated hardware combinations. The code fragments are C code of course, but are preceded where necessary by pseudocode to give a better idea of the underlying algorithm. Complete code is given for the drivers, but this book is not really about programming as such. It probably tells you more about hardware than most programmers ever wanted to know, unless they were asked to write a device driver- which this book presumes you are. The book is biased towards IBM PC interfacing (8250 UART, LPT1, etc) but not exclusively. More importantly the principles remain the same and the author always seeks to explain things and make you think about what is happening. Furthermore the book is based on Unix version 3 (SVR3) with particular reference to SCO Unix, with only the last chapter introducing the principles of SVR4. However streams are treated more thoroughly with separate chapters on a loop-back driver and a rewrite of the terminal driver for COM1. After a general explanation, the book is divided into chapters covering individual drivers in increasing levels of complexity. There are character drivers for a test data generator, an A/D converter, a line printer, a more complicated test data generator, a raw disk driver, and a tape driver. Block drivers cover a test data generator, RAM disk, and SCSI disk. There is a terminal driver for COM1 and streams drivers for a loop-back driver and COM1. Finally, there is a chapter on installation and one on Zen and Driver Writing. The installation chapter refers you to your system manual for specific details, but explains how device installation is meant to work. The Zen chapter is general philosophy on when to write a driver and problems in debugging. Of particular note is the assertion that it is easy to write drivers provided that you have "..a mind unbound to conventional hang-ups about determinism, causal theory, logic, and the expectation that any piece of hardware will work the way its designers described." There have been more recent books on writing device drivers for various flavors of Unix, but none is as instructive and detailed as this book. You may need an additional text on device drivers for the particular flavor of Unix you are working with, but this book is still essential.
on October 3, 2001
What I'm appreciating about this book is the simplicity and the vigor of the writing. It's *really* easy to make this topic sound really complicated. Pajari's approach lays out as few issues at one time as possible, then adds gradually to the mix. The early parts are not taxing, but the pace does pick up.
In teaching the subject, I often find it difficult to slow students down, and get them to confine their questions to one problem domain at a time. Device drivers have to fit into the kernel subsystem and communicate with a device through interrupts; there are LOTS of side questions people can dream up.
This book gave me a few insights into containing the discussions and forestall all that anxiety. Well worth the wait to get the book.