Inside the Machine

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.


5 thoughts on “Inside the Machine

  1. Deepak 2011-12-13 / 05:34

    This was in my To-READ list, but I thought I might already know a lot of it, and so I dropped it. (No ego boasting here: pure return-on-time-investment perspective.) What’s your take, being a computer science post-grad?

    • Ashwin Nanjappa 2011-12-13 / 07:00

      Deepak: Yes, I am sure you will know most of the stuff covered in this book. I still recommend it because of a few reasons.

      Unlike other comp. arch. books Stokes introduces 4 illustrations of the CPU and consistently uses these 4 for *all* the microarchitectures discussed. This makes recalling or revising a specific architecture a simple diff. For example, Pentium (P5) = Stokes’ basic architecture + branch unit + multiple ALU units. Plus, the book is a quick absorbing read, so I am sure you can finish it in 2-5 days. You could also probably skip the first 4 introductory chapters and go ala carte on the rest of the microarchitecture chapters.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s