Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Book Reviews Books Media

Inside the Machine 53

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.

Inside the Machine

Comments Filter:
  • 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 @04:38PM (#18322119) Homepage
    I would also recommend The Intel Architecture Software Developers Manual. Oh, and its free.
    • Or Computer Architecture: A Quantitative Approach by Hennessy & Patterson
      • Re: (Score:1, Informative)

        by Anonymous Coward
        Absolutely. I'm thumbing through my Hennessy & Patterson right now. If you want to understand how to design a basic CPU, I highly suggest this book as well. Within a matter of weeks, you'll be designing your own multicycle FSM in verilog. It's undergone about four or five revisions now, but I still have my first edition [amazon.com]. It doesn't cover pipelining or multiprocessors in _great_ detail, but more than enough to get anyone familiar with the concepts. Anything by Hennessy & Patterson is a keeper!
  • by elrous0 ( 869638 ) * on Monday March 12, 2007 @04:48PM (#18322241)
    I like to think he's still in there, fighting for the users.
    • ...fighting for the users.

      When asked for comment, Tron responded:
      "Given the standard sub-standard training of most lusers,
      they can kiss my glowing metal ass."

  • "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
    • you think he might've chosen Intel chips just to keep his explanations on what's most common? or is there some kind of hidden funding afoot?!?
    • by Caesar ( 9965 ) *
      As Jon noted in the book and elsewhere, AMD wasn't forthcoming with tech docs.
    • Just glancing at the table of contents, PowerPC is treated pretty much throughout, often in direct comparison to the Intel Way. I'm not sure what differences you would expect to see between discussion of x86 from and Intel or AMD perspective. Really it would be nice if there were more in there on SPARC, Alpha, or Itanium.
    • by thyrf ( 1059934 )
      That wouldn't really be the best title. Intel defined the x86 architecture (which is why you might remember seeing some old software that says it's built for an Intel PC) whilst the other manufacturers were merely clones (cyrix, amd, etc.). It wasn't until a fair few years after the introduction of x86 that companies such as amd branched further away from what intel were doing. Just compare how a core duo works with an athlon x2. This could be one of the reasons why AMD weren't covered as extensively, no do
  • Is there much 64-bit like Intel's Itanium (1 and 2), DEC's Alpha (early 1990s), AMD64?
    • by Icedman ( 933302 )
      There are a few, like MIPS R4000 in 1991, which was used by SGI, then there's Sun's SPARC, HP's PA-RISC..

      And if you start looking at the supercomputers like Cray-1 and others, you find that 64-bit architecture has been in use for quite a while :P

      http://en.wikipedia.org/wiki/64-bit [wikipedia.org] Wiki's 64-bit article has some info on what was and what is currently. Might be complete, might not be complete. Can't see much sources on that page, so it might not be accurate.
  • by Caesar ( 9965 ) * on Monday March 12, 2007 @05:02PM (#18322455) Homepage

    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 onsblu ( 1047608 ) on Monday March 12, 2007 @05:25PM (#18322837)
      It's a tough call: 2-day UPS for $31.47 (Amazon) or USPS w/o tracking for $49 (Ars).
    • Any idea how long that price and shipping deal are going to be good for?

      I don't normally go out and buy coffee-table type books for myself, but they make really good entries on a gift list. If that offer from Ars is going to be good for a while, I'll definitely keep it in mind, the next time I get someone bugging me through an intermediary that they want to know what I'd like as a gift.
    • by mzs ( 595629 )
      I bought "Inside the Machine" just a few days ago after reading Hannibal's blog. I bought it from Amazon instead because I could not find it in the "Ars Store." There was no link to store.arstechnica.com from the blog or the Ars home page that I could find.The link I found was the Shop.Ars link to arstechnica.shopping.com which was useless. I thought it was just not in the store yet. You need to make the Ars Store easier to find if you want people to buy things from there. I really wanted to buy it from Ars
  • by mrbill ( 4993 ) <mrbill@mrbill.net> on Monday March 12, 2007 @05:38PM (#18323043) Homepage
    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.
    • Re: (Score:2, Interesting)

      by ystar ( 898731 )
      I've been using H&P for the past year, and though I see it as my bible, I wish the style it was presented in was a little (or rather, even) more clear - for instance, how latching works in basic pipelining or a step-by-step iterative diagram of Tomasulo (especially before adding in multiple-issue stuff)...I get confused having to look back to the beginning to "remember" how everything fits together ...although maybe my brain capacity is just getting smaller... :)
  • by HonkyLips ( 654494 ) on Monday March 12, 2007 @06: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.
    • Does this book cover how memory management works?

      The reason I ask is that I used to code in Z80 years and years ago, but since then I've not written any assembler and although I have a vague understanding of whats changed, I don't actually know how any of it works -- memory management being one thing in particular that I don't understand!
  • Does this book explain how the series of tubes works? Nobody seems to know...
  • No wonder computers are so confusing!
  • Other good texts... (Score:5, Interesting)

    by kabdib ( 81955 ) on Monday March 12, 2007 @07:17PM (#18324471) Homepage
    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).
  • 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.
  • 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 fa

I have hardly ever known a mathematician who was capable of reasoning. -- Plato

Working...