Back in 2013 I published a post on the different levels on which a computing device could be understood from a working level down to the physics behind the individual gates. One facet that has been missing for me so far was a look at the features that make today’s CPUs so powerful. “Inside the Machine” by John Stokes filled that gap for me.
“Inside the machine” is already 10 years old, written back in 2006 and hence not quite up to date anymore so don’t expect any deep insights into the current 6th generation of the Intel Core architecture. But for me that didn’t matter much as it still includes the “Core 2 Duo” architecture from which the current i3, i5 and i7 designs derive.
In his book John discusses the major building blocks and ideas behind a modern CPU to increase performance. Superscalarity, multi-CPU architecture, pipelining the fetch, decode, execute and write back phases of an instruction, microcode, fusion, lamination, out of order execution, simultaneous execution, branch prediction, caches, cache lines, associative caches, write policies, front-end, back-end, register renaming, vector operations, instructions for virtual machine operations, x86 vs. x86_64, etc. etc. etc.
10 years ago when the book was written Apple was still using PowerPC processors and was just about to transition to x86 CPUs. The book thus not only describes the evolution of x86 but also that of the PowerPC architecture and makes frequent comparisons between them. After reading the book it becomes quite clear why Apple abandoned the PowerPC CPU at some point in favor of the x86 architecture. Quite fascinating also from a historical point of view.
While I can fully recommend the book there is one important point readers should be aware about: As the book explains the concepts mentioned above it has to remain at a fairly high level of how things such as the control unit, the arithmetic logic unit (ALU) and many other components work on the inside. In other words, there’s no discussion about transistors, logical gates, binary adders, counters, flip-flops and other things that make a CPU tick. For that I can fully recommend another book called “But How Do It Know“. I would say there is no overlap between the two books and my advice thus is to read “But How Do It Know” first before giving “Inside The Machine” a go.