Pages

Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

Friday, 29 August 2008

Multicore Multifiasco

Dave Patterson is one of the most respected names in computer architecture, and rightly so, having been one of the co-founders of the RISC movement, as well as being one of the prime movers behind RAID, among other things.

Nonetheless, when he posted an article on the potential and pitfalls of multicore designs on the Computing Community Consortion blog, I couldn't help but post the following, repeated here with a few additions.

It’s my experience that every decade or so, a packaging breakthrough allows some previously forgotten or abandoned approach to be resurrected at a lower price point, and all the previous lessons are forgotten.

Here are a few of those lessons:

  1. parallel programming is inherently hard, and tools and techniques claiming to avoid the problems never work as advertised
  2. heterogeneous and asymmetric architectures are much harder to program effectively than homogeneous symmetric architectures
  3. Programmer-managed memory is much harder to use than system-managed memory (whether by the operating system or by hardware)
  4. Specialist instruction sets are much harder to use effectively than general-purpose ones

I nearly fell out of my chair laughing when the Cell processor was launched. It contained all four of these errors in one design. Despite the commercial advantages in bringing out a game that fully exploited its features, as I recall, only one game available when the Playstation 3 was launched came close.

I hereby announce Machanick’s Corollory to Moore’s Law: any rate of improvement in the number of transistors you can buy for your money will be matched by erroneous expectations that programmers will become smarter.

Unfortunately there is no Moore’s Law for IQ.

The only real practical advantage of multicore over discrete chip multiprocessors (aside from the packaging and cost advantages) is a significant reduction of interprocess communication costs — provided IPC is core-to-core, i.e., if you communicate through shared memory, you’d better make sure that the data is cached before the communication occurs. That makes the programming problem harder, not easier (see Lesson 3 above).

Good luck with transactional memories and all the other cool new ideas. Ask yourself one question: do they make parallel programming easier, or do they add one more wrinkle for programmers to take care of — that may be different in the next generation or on a rival design?

Putting huge numbers of cores on-chip is a losing game. The more you add, the smaller the fraction of the problem space you are addressing, and the harder you make programming. I would much rather up the size of on-chip caches to the extent that they effectively become the main memory, with off-chip accesses becoming page faults (I call this notion RAMpage). Whether you go multicore or aggressive uniprocessor, off-chip memory is a major bottleneck.

As Seymour Cray taught us, the thing to aim for is not peak throughput, but average throughput. 100 cores each running at 1% of its full speed because or programming inefficiencies, inherent nonparallelism of the workload and bottlenecks in the memory system is hardly an advance on two to four cores each running at at least 50% of its full speed.

In any case all of this misses the real excitement in the computing world: turn Moore’s Law on its head, and contemplate when something that cost $1,000,000 will cost $1. That’s the point where you can do something really exciting on a small, almost free device.

Further reading


My PhD thesis, completed in 1996, but now relevant to a wider audience since multicore has become mainstream, is available on Amazon. See Other Links.

Some interesting stuff here: The Perils of Parallel: Vive la (Killer App) Révolution!

Thursday, 5 July 2007

iPhone = iFlop?

Within days of the iPhone's launch, some clown published an article claiming "Apple's iPhone missed a 1 million unit sales target and rivals are rejoicing". I haven't seen this "target" anywhere else and judging from the fact that most AT&T stores and a high fraction of Apple's retail outlets are reporting stock shortages, it is extremely unlikely that Apple missed an internal target.

Then there are the articles that iPhone will not be adopted by business, mainly because it does not fit the "standard" of Microsoft Exchange.

Wake up, people.

Microsoft is not a standards organization, it's a monopoly.

Any organization which ties its infrastructure to a monopoly when there are open standards available (which are technically superior in most respects) has to be run by morons.

Until they lost their dominance, it used to be said that "No one was ever fired for buying IBM". This wasn't always because they had the best technology (they didn't) but because they had a strong commitment to looking after their customers. If you are a huge customer, you may get that from Microsoft. Good luck otherwise.

Another "biggie" is the absence of a "real" (what they mean here is "toy") keyboard. I can't see myself that typing on a tiny keyboard with real keys is going to be a whole lot faster than Apple's touch screen if it works as advertised. As some have pointed out, learning to type reasonably fast on these small keyboards takes time; already some have claimed to be reasonably quick on the touch keyboard. This looks to me like jumping to a conclusion before the facts are in.

I can just imagine these analysts poised over their keyboards for the first reports of functionality to dribble out, so they could finish their headline "iPhone will not be adopted by business because ...".

In any case, why is this such a big deal? What we have is a simplified portable computer with cell phone functionality, WiFi, calendar, web access (with a few features left out), photo viewing and music. The last two clearly indicate a focus on personal use. The market for personal cell phones is huge, as is the market for music players. Putting these two together alone would be pretty big – as several have tried before. The only real question is whether Apple has a compelling enough product to sell. The initial sales are promising – but the real test will be in how sustainable they are.

So, hype and counter-hype aside – it's still early days, and any prediction of how hot iPhone will be long-term is premature. My feeling is that it will be pretty big but there are too many unknowns to be sure: that's what you get with a breakthrough product.

That leads me to the other common thread: is it a breakthrough product?

Just as with the iPod, there are plenty of other options out there that on paper have the same feature list – even add some missing details. (Like toy slide-out keyboards.) Just as with the iPod, the real difference will be how it all hangs together. Apple can fix some of the obvious annoyances (I was really surprised that there is no copy and paste); the competition can't make a solution cobbled together out of mismatched parts suddenly become cleanly integrated. The difference reminds me of a question I ask about cars: how is it that European car makers can build cars that are made all of a piece, whereas US cars are made all of pieces?

A real big difference I haven't seen much positive comment on is the way pricing splits the handset from the phone plan. This is supposedly a negative. At first sight, it doesn't make a whole lot of sense that (aside from non-obvious workarounds) you have to sign up for 2 years of Cingular, yet the handset is sold separately. My guess is that this arrangement is an artifact of Apple's 2-year US exclusivity deal with AT&T, and they would rather maintain this separation for when the deal runs out. To me, this is a positive: it puts real pressure on Cingular to up their act, to keep future iPhone buyers. If they become the major source of complaint, Apple will have no reason to stick with them after 2 years: if iPhone is a huge success, other networks will have little cause to resist adding in the extras Apple needs from them.

So, in summary, talk of iPhone as being a flop is typical FUD from ignorant business columnists. There's no way the initial roll-out can be anything but a huge success. As to the longer term, we don't have the data. My bet is that it will do well, and exceed Apple's 10-million target in the first year easily.