Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Inside the Machine

Posted by samzenpus on Mon Mar 12, 2007 03:30 PM
from the take-a-look-in-there dept.
Paul S. R. Chisholm writes "Inside the Machine: An Illustrated Introduction to Microprocessors and Computer Architecture, written by Ars Technica's Jon "Hannibal" Stokes, talks about how CPUs work, and how they've evolved and advanced in the past fifteen years. The result is detailed, very up-to-date (including descriptions of Intel's Core 2), generally clear, and covers a lot of fascinating material." Read below for Paul's review.
Inside the Machine: An Illustrated Introduction to Microprocessors and Computer Architecture
author Jon Stokes
pages 320
publisher No Starch Press
rating 8
reviewer Paul S. R. Chisholm
ISBN 1593271042
summary A detailed look at how CPUs work, and how they've evolved and advanced in the past fifteen years


How on earth have CPUs advanced as fast as they have? How have we gone from 60 MHz Pentiums in 1993 to 3.73 GHz Xeons (with two cores) and 2.66 GHz Core 2 Extremes (with four!) today? Sure, Moore's Law and competition pushed the chip makers, but how did they implement all that extra performance? In Inside the Machine, Jon "Hannibal" Stokes provides a thorough, exhaustive, nearly exhausting look at what's at the heart of your computer. If Stoke's name sounds familiar, he's a founder and long-time contributor to Ars Technica. Anyone who liked his work there, his comprehensive articles and brightly colored diagrams, will probably enjoy this book a lot.

The first two chapters cover the basics of CPU operation and machine language. These are pretty good, though you'll probably need some assembler language experience to really understand everything in these chapters. Even without such experience, you'll pick up enough to get through the rest of the book.

The next two chapters get more advanced, covering pipelined and superscalar execution. CPUs don't execute one instruction at a time. Instead, they break instructions into smaller operations, and work on those smaller operations in parallel. These two chapters begin to tell how CPUs do that. (The book also discusses caching, another huge performance booster. For some reason, Stokes doesn't get to that until chapter 11.)

The rest of the book discusses specific CPUs. From Intel, we see the original Pentium, Pentium Pro, Pentium 4, Pentium M, Core, and Core 2. (Intel didn't release as much information about the Pentium II and III.) From the Apple/IBM/Motorola alliance, we learn about the 601 (the heart of Apple's first "Power Mac"), 603, 604, 750 (G3), 7400 (G4), and 970 (G5). In the middle of all that, there's also an excellent description of 64-bit computing, its advantages, and even its disadvantages.

Every buzzword you've ever heard about CPUs is covered: front end vs. back end, branch prediction, out-of-order execution, pipeline stalls, SIMD, direct-mapped vs. N-way set associative mapping. That sounds intimidating, but Stokes introduces the concepts one at a time, clearly and in detail. The next time an overclocking fanatic tries to tell you why his AMD CPU is so much better than your Intel CPU (or vice versa), you'll not only be able to follow the whole discussion, you'll be able to argue back.

Stokes turns all this into a (highly technical) history of CPU development. One chip's virtue is its successor's vice; one generation's shortcoming is another's opportunity.

This book reinforced something I already knew but don't often enough live by: Portability depends on architecture (for example, x86 vs. PowerPC), but high performance depends on microarchitecture (for example, Pentium M vs. Athlon 64 X2). Today's Core 2 chips have many high performance features missing from the 1993 original Pentiums. A good compiler like gcc can take advantage of those additional features. This is bad news if you're using a binary Linux distribution, compiled to a lowest common denominator. It's good news if you're building and installing Linux from source, with something like Linux From Scratch or Gentoo/Portage. It's also good news for just-in-time compilers (think Java, .NET, and Mono); they're compiling on the "target" machine, so they can generate code tailored for the machine's exact microarchitecture.

The full color diagrams were a big help in understanding Stokes's points. On the other hand, I'm not sure why the book was printed in hardcover. To make it look more like a textbook? Is that a good thing?

The text is packed with jargon, buzzwords, and TLAs (Three Letter Abbreviations). Most of that is unavoidable, but a glossary would have been nice. Each chapter builds on the previous ones, so most readers will want to read all the chapters in order, paying close attention the whole time. Even so, this book had a lot more forward references ("I'll define that shortly" or "We'll get to that later") than most technical books.

Don't expect much non-technical discussion. Exceptions: There is a very good description of the Pentium 4's obsession with higher and higher clock speeds, including marketing pressures, and the resulting performance increases and drawbacks. The occasional "Historical Context" sections are also quite nice. But you'll see nothing on Apple's decision to move from PowerPC to Core, or the competitive battle between AMD and Intel. For that matter, you'll see almost nothing at all about AMD or its products.

Personally, I think Stokes missed an important opportunity to talk in depth about multiprocessing. He spends only four pages on the subject, and that only as part the description of the Core Duo. You'd think there was never a multi-core G5. There's only a couple of paragraphs on the difference between multiple CPUs and multiple CPU cores. ("Dual dual-cores" and the AMD 4x4, anyone?) He declines to discuss how caches interact with multiple CPUs or multiple cores. That's unfortunate, because anyone doing multi-threaded software development really needs to understand cache issues, at just about exactly the level this book covers. But you'll find nothing here about cache coherency, or about what out-of-order execution results might be visible only to multi-threaded software.

Jon Stokes had an incredibly ambitious goal: to write an accessible book that covers much of the same ground as Hennessy and Patterson's Computer Architecture and Computer Organization and Design. I don't think he achieved that, but he came pretty close.

You can visit the book's home page or the author's blog.

Paul S. R. Chisholm has been developing software for 25 years. He's worked at AT&T Bell Laboratories, Ascend Communications / Lucent Technologies, Cisco Systems, and some small startups you've never heard of. His latest article, "'Pure Virtual Function Called': An Explanation," appeared in The C++ Source. He lives and works in New Jersey.


You can purchase Inside the Machine: An Illustrated Introduction to Microprocessors and Computer Architecture from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • One problem... (Score:1)

    by creimer (824291) on Monday March 12 2007, @03:33PM (#18322035)
    (http://www.creimer.ws/ | Last Journal: Friday January 26 2007, @12:40PM)
    It never shows the Mario character who constantly flushes the bit bucket down the toliet.
  • intel (Score:3, Informative)

    by mastershake_phd (1050150) on Monday March 12 2007, @03:38PM (#18322119)
    (http://freedomsforums.com/)
    I would also recommend The Intel Architecture Software Developers Manual. Oh, and its free.
    • Re:intel by plcurechax (Score:2) Monday March 12 2007, @03:59PM
      • Re:intel by Anonymous Coward (Score:1) Monday March 12 2007, @07:21PM
      • 1 reply beneath your current threshold.
    • Link by mastershake_phd (Score:1) Monday March 12 2007, @04:38PM
      • Re:Link by BillGatesLoveChild (Score:1) Monday March 12 2007, @07:26PM
  • by elrous0 (869638) * on Monday March 12 2007, @03:48PM (#18322241)
    I like to think he's still in there, fighting for the users.
  • by Thirdsin (1046626) on Monday March 12 2007, @03:52PM (#18322301)
    "But you'll see nothing on Apple's decision to move from PowerPC to Core, or the competitive battle between AMD and Intel. For that matter, you'll see almost nothing at all about AMD or its products."
    Perhaps he should have named his book something else.

    Inside the Machine: An Illustrated Introduction to INTELprocessors and PC Architecture
  • 64-bit? (Score:2)

    by plcurechax (247883) on Monday March 12 2007, @03:53PM (#18322311)
    (http://www.microsoft.com/)
    Is there much 64-bit like Intel's Itanium (1 and 2), DEC's Alpha (early 1990s), AMD64?
    • Re:64-bit? by Icedman (Score:1) Tuesday March 13 2007, @01:03AM
  • by Caesar (9965) * on Monday March 12 2007, @04:02PM (#18322455)
    (http://arstechnica.com/)

    The review doesn't mention this, so I thought I would since I know many Slashdot readers also read Ars, but may have missed this.

    If you buy the book from Ars [arstechnica.com], shipping is free almost anywhere on earth (if the USPS ships there, so can we). Yes, we charge more than Amazon, but it's a good deal if you want to support Ars. We also include a free year of access to the Ars PDF Library, and we'll also be giving our customers a free copy of the digital edition when it's available later this year.

  • by mrbill (4993) <mrbill@mrbill.net> on Monday March 12 2007, @04:38PM (#18323043)
    (http://www.mrbill.net/)
    Jon Stokes had an incredibly ambitious goal: to write an accessible book that covers much of the same ground as Hennessy and Patterson's Computer Architecture and Computer Organization and Design.

    He actually says in the book that it should be used as an introduction, before someone dives into H&P.
  • Perfect sequel to "Code" (Score:5, Informative)

    by HonkyLips (654494) on Monday March 12 2007, @05:03PM (#18323429)
    I bought the book because I read Ars and enjoy Stokes' articles. I read it, loved it.

    I thought it was the perfect logical sequel to an older book called "Code", by Charles Petzold (ISBN 0-7356-1131-9).

    "Code", about 7 or 8 years old now, starts with the very basics of computation- beginning with binary codes and lightbulbs, then demonstrating how a microprocessor can be built from nothing but relays, and ending with a discussion of two classic microprocessors- the 8080 and 6800.

    "Inside the Machine" basically picks up where "Code" finishes. It begins with a look at ISAs and CPUs, examine theoretical models slightly simpler than the 8080 and 6800, before moving onto pipelining and superscalar execution, and ending with the very latest from Intel.

    It's a shame someplace like Amazon isn't selling them packaged together, you can easily work your way through Petzold's primer- beginning with the most fundamental basics of computing, end it with a solid understanding of the state of technology in the late 70's, then pick up Stokes' book and continue the journey through to the present day.

    I recommend both books.
  • by Jon Abbott (723) on Monday March 12 2007, @05:04PM (#18323441)
    (http://monogon.org/)
    Does this book explain how the series of tubes works? Nobody seems to know...
  • TLA = Three Letter Acronym (Score:2, Funny)

    by RandomIO (526821) on Monday March 12 2007, @05:16PM (#18323613)
    No wonder computers are so confusing!
  • Other good texts... (Score:5, Interesting)

    by kabdib (81955) on Monday March 12 2007, @06:17PM (#18324471)
    (http://www.dadhacker.com/)
    Other good texts include Processor Architecture: From Dataflow to Superscalar and Beyond (Silc, Robic, Ungerer) and (my favorite) Modern Processor Design: Fundamentals of Superscalar Processors (Shen and Lipasti). The latter appears to be more in-depth and technical than Inside the Machine (which is pretty, but which concentrates a little too much on implementations for my taste).
  • Another good read (Score:1)

    by dreadknought (324674) on Tuesday March 13 2007, @12:48AM (#18328373)
    The Art of Assembly Programming is another great (online) book to read, which, IRRC, is almost completely about PC achitectures in the first 20 chapters or so, which help to explain some of the quirks in programming languages, esp. ASM, in later chapters.
  • Not so impressed (Score:1)

    by mjrobinson (922279) on Sunday March 18 2007, @10:20AM (#18394257)
    (http://www.bikesandkites.com/)
    I know a moderate amount about the subject matter and wanted to know more so I bought the book. These are my opinions...

    Editing: Each page of text appears to be split into 3 equal sections -
    • Text telling you what he's going to say, what he's just said, and perhaps why he won't be explaining a particular thing until chapter 9. I found this confusing and it just led me to hate the editor.
    • Some general waffle that neither helped explain the current subject or made the text easier to read.
    • An interesting fact was always buried in there somewhere.

    Diagrams: Successful diagrams should explain a given point at a glance. These diagrams are just colourful interludes between the text.

    TLA's: The text is full of TLA's yet little help is given to the reader to explain them. If a new TLA is introduced on a page then it should appear in a coloured text area to make it easy to find. A glossary of TLA's should be given at the back of the book as well.

    Coverage: I thought he covered a lot of ground through the book (even if the book could of been a 1/3 the size) but I'd liked to of seen a little bit more about different types of processors (microcontroller processors, mainframe processors etc) just so I felt I had a wider knowledge.

    You can learn a lot from this book but the author certainly isn't making it easy for you.

    Mike

  • Re:Oh noes! (Score:2)

    by jimstapleton (999106) on Monday March 12 2007, @03:48PM (#18322235)
    (Last Journal: Tuesday February 06 2007, @09:13AM)
    yes.

    Expect to be the equivalent of a double-a in a pod sometime around the middle of next week.

    Have a nice day.
    [ Parent ]
    • Re:Oh noes! by Anpheus (Score:2) Monday March 12 2007, @04:15PM
  • Re:Wow! (Score:1)

    by stratjakt (596332) on Monday March 12 2007, @03:48PM (#18322239)
    (Last Journal: Thursday November 08, @06:56PM)
    The next time an overclocking fanatic tries to tell you why his AMD CPU is so much better than your Intel CPU (or vice versa), you'll not only be able to follow the whole discussion, you'll be able to argue back.

    But you'll see nothing on Apple's decision to move from PowerPC to Core, or the competitive battle between AMD and Intel. For that matter, you'll see almost nothing at all about AMD or its products.

    You'll be able to fight back with not knowing what the fuck you're talking about, like a true slashdot poster!

    Act fast, supplies are limited and demand is high!
    [ Parent ]
  • Re:Oh noes! (Score:1)

    by obarel (670863) on Monday March 12 2007, @05:15PM (#18323601)
    Machines don't evolve. God created them just the way they are.
    [ Parent ]
  • Re:Wow! (Score:3)

    by Chris Burke (6130) on Monday March 12 2007, @06:13PM (#18324431)
    (http://slashdot.org/)
    Well if it does what is purported, then it still covers what is a roughly 2nd or 3rd year curriculum for a computer engineering degree program. Even given that it may not do as good a job of presenting the material as an actual course, that's not bad for a layman's book, and it's cheaper than Hennessy and Patterson.

    Frankly I think it would do the quality of CPU discussion on /. some good if more people had some knowledge on these topics not derived from Tom's Hardware. And certainly it would do nothing to change the number of people pretending to be computer experts on /., since most of those do so without having ever read a computer book to begin with.

    And, to go on a geeky utopianist side-track for a second, it would be fantastic if the resources available to amateurs regarding computer architecture was comparable to those available to amateur programmers. That's been one thing I always liked about programming, the ability to self-teach and test out what you've learned. Now if only FPGAs were cheaper and simpler to get so people could use this knowledge. I've looked an it's possible to get dev boards, I just mean something like you walk into Fry's and buy a Xylinx board with dev tools for your PC and a book on architecture, then go home and code yourself up an Alpha.
    [ Parent ]
    • Re:Wow! by fitten (Score:1) Tuesday March 13 2007, @09:11AM
    • 1 reply beneath your current threshold.
  • 4 replies beneath your current threshold.