hardware

Exciting times ahead

Friday, April 9th, 2010 by Tim Hoverd

I’ve been musing about the future, so forgive me for a bit of crystal ball gazing.

For years we’ve been building complex software systems, confidence that the underlying hardware was getting quicker and quicker courtesy of Moore’s law. This still boggles me; I stopped being a professional electron herder many years ago and at the time we were talking about the feature size on silicon dice getting down to the heady depths of 1 micron. There’s now people talking blithely about features in the region of a tenth of this size and this week there’s an announcement from HP that they’ve finally  managed to fabricate the famed memristors, or at least one type of them, on silicon offering the hope of even higher densities. (Although, to be fair, memristors are not transistors which is what Gordon Moore was actually talking about.)

Up to now we’ve managed to just get faster and faster processors so we’ve just been able keep blundering on with our old approach to software. In 1971 there were about 2,000 transistors on a single processor die, and now there are about 2 billion. That’s a million-fold improvement in the raw performance of the silicon. Could we honestly say that the software we write is a million times more effective than it was in 1971? I doubt it. What’s more, I think there’s a real problem coming up.

Although the chip makers are still following the Moore’s law yellow brick road it’s clear that in recent years they haven’t been able to just make faster and faster processors as they’re too close to the limits of the underlying physics. Rather, they’re building multicore architectures which allow a single processor die to genuinely do many things in parallel. Just about all of us have dual core machines on our desks and 4 and 8 core server chips are common. Most software design has been able to ignore this issue up to now because we’ve just been able to allow allow separate threads to be scheduled to one core or another and there have been enough threads to use the processors fully. In particular in server farms each of a number of transactions has been able to be scheduled to a core at a time.

However, many of us will have been aware of times when we’re running some CPU intensive activity like video processing and the little CPU load indicator says that exactly 50% of our super-duper dual core chip is being used. That’s because some bozo designed that video processing software to be single threaded and as such it can only use a single core at a time. As time goes by that software will be able to use less and less of our machines. Moore’s law dictates that in 18 months we’ll all be buying 4 core machines, in 3 years we’ll be getting 8 core machines and in 6 years time we’ll routinely see 32 core machines. This is really happening, this year Intel demonstrated a prototype of a 48-core chip, each core being a roughly PC-like machine.

So, in 6 years time that video processing software will be able to use 1/32th of a typical processor which won’t seem that wonderful.

How are we going to use those cores? It seems to me that we’re finally going to have to learn to write properly concurrent programs. Many of us will have flirted with this over the years, especially with special concurrent programming languages like occam, Erlang and X10. In many case we’ll remember the extreme annoyance with writing software that just deadlocked or livelocked all over the place and how difficult it was to understand what was going on. As such we’ve all retreated back to a nice serial (or pseudo-serial via a transactional mechanism) world. It seems to me that we’re going to have to start getting back to working out how to use fine-grained concurrency. It’s going to be really quite difficult and, I suspect, a pretty bumpy ride.

Sounds like fun…

Using Parallels to run Windows on a MacBook

Thursday, May 17th, 2007 by DenisH

I haven’t added anything to the blog for a few months as I’ve been busy on a number of fronts. First I’ve swapped over to using a MacBook for day-to-day development. It took me a while to get used to, especially as the keyboard layout in the UK is different from the PC–and it took me a while to discover that that # is produced using ALT-3 and isn’t even shown on the keyboard. But I love it! It works really well.

I use IntelliJ and Eclipse for development with Firefox for Java, PHP and Web development so it’s not much different. MS Office 2004 for the Mac is very different from Office 2003 for the PC, but all works as expected (though there’s no plug-in for the docx format yet). It’s very nice having Unix under the hood too.

However, there are a couple of things I still need a PC for, and the most important of those is running Internet Explorer so that I can test web pages. I have other PCs lying around, so I could use those, but the solution I’ve gone for is to use Parallels (www.parallels.com). This allows you to run a Windows virtual machine (and Unix if you like) at the same time as MacOS. So I have MacOS for development and then Windows in a window. Windows has access to the DVD drive and internet and behaves just like the real thing–well it is the real thing (you do need a Windows operating system license to install it). So I can run Internet Explorer and any other PC-only tools on my Mac whenever I need them.

Replacing your hard disk

Monday, November 13th, 2006 by DenisH

A friend of mine had that dreaded moment when his main PC wouldn’t boot. Backups? Yes, well I was going to get round to it….

I suggested that he should insert the Windows XP CD and see if he could boot from that. He was lucky and he was able to do that and get Windows XP to repair itself enough to run up and view the data on the hard disk, in fact for a while it did seem to work.

But this obviously wasn’t going to last for long, the primary hard disk was definitely on the way out. So he needed to replace the hard disk. But that’s always a pain because you have to re-install everything from scratch and that can take days.

Instead, he bought a new hard disk, borrowed my hard disk external USB caddy (which you can find on the net for about GBP20) and downloaded a bit of software called Acronis True Image 9.0.

With this he was able to make an image of his old hard disk. He then replaced the old hard disk with the new one and amazingly enough it booted with pretty much everthing there.

It wasn’t quite transparent, here’s what he told me afterwards:


Some but not all of the registry details are lost when you copy the disk. There does not seem to be any particular logic to the ones that are lost. However, as I think I told you – Photoshop needed to be “re-registered”. I had to boot Windows from the installation disk – (so far only once) but didn’t actually have to re-register it with Microsoft. My Palm Pilot needed to be re-registered. Similarly, almost all the bits of hardware that run off USB ports need to reload the drivers.

Nevertheless, a lot quicker than starting from scratch.

On the other hand, the main advantage from starting from scratch is that there ends up being loads of software you never do re-install, so it is a good way of weeding out stuff :-)