I find most of the celebrated books on computers to be extremely dry. Though they are packed with important information, they make no effort to engage the reader and fail to give an intuitive understanding of the subject. Jon Stokes is that rare breed of technology writer whose book Inside the Machine is so edge-of-the-seat absorbing that it is hard to believe that it is about computer architecture and microprocessors. Stokes is the co-founder of the Ars Technica website, one of my favorite haunts, where he has written in-depth articles about processors since 1998.
The first 4 chapters of the book deal with the basic architecture and execution steps of a microprocessor, pipelining and superscalar execution. Stokes takes the reader through 4 conceptual views of the CPU: (1) as a calculator (2) as a computer reading instructions and data from memory (3) the programmer's view of the processor, also known as the Instruction Set Architecture (ISA) and (4) the actual microarchitecture of the chip. In here and in the rest of the book, Stokes uses lots of colorful illustrations to depict how the CPU is structured and how it behaves while processing instructions. Without a doubt, these are the most engrossing diagrams I have seen of computer architecture and they are easy to grasp and remember. Add to this the countless wonderful analogies that Stokes describes in the text that help to see the topic from many different viewpoints.
The rest of the book picks many popular processors and uses each to introduce a contemporary technique or concept. What follows are the items I found interesting in this part of the book. Chapter 5 deals with the Pentium and Pentium Pro (P6) microarchitectures, using them to explain branch prediction, dynamic scheduling and micro-operation decoding. Chapter 6 uses PowerPC processors to talk about RISC and its typical microarchitecture. Chapter 7 introduces the Pentium 4 (NetBurst) microarchitecture whose ginormous 20-stage pipeline I loathed and whose trace cache I thought was a really cool idea. Chapter 8 covers vector support: MMX, SSE and SSE2 in Intel and AltiVec in PowerPC processors. Chapter 9 talks about 64-bit computing, tells the story of Intel's failure to push a new ISA through the 64-bit Itanium and how AMD stole the show with its x86-64. Chapter 11 is oddly placed towards the end and it deals with caching. Special mention goes to the kick-ass analogies and delightful illustrations of the types of caching and caching hierarchy here. The final Chapter 12 brings the reader to today, with the power-saving architecture of Pentium M and the Core 2 Duo multi-threading architecture.
Inside the Machine is an absolute must-read for anyone who works with computers. I only wish the ARM microarchitecture, which is now popular on handheld devices, was covered in the book. Jon Stokes really succeeds in giving the reader a big-picture view of the internal structure and workings of today's microprocessors. Do not be surprised if this book turns you into a processor geek who follows the microarchitectures of upcoming processors. Inside the Machine is the kind of book on science and technology that I love to read and cherish.