Saturday, November 26, 2005

 

64 Bits - It's MS-DOS all around :-))

A few weeks ago I was talking with a customer about the challenge and potential rewards of moving their software to 64 bits. In the past few days, I received a call for papers and an article to review on the same topic. Overall, I expect a *lot* of C/C++ software to fail when moved to 64 bits. The reason is simple: too much code has never been written with portability in mind. Readers old enough to remember the MS-DOS era will probably remember how hard it was to port software from the Unix world to MS-DOS. I'm not talking about system programming: even most "computational" stuff like, e.g., a prolog interpreter was hard to port. The reason was not the 640KB limit. Sure, it didn't help, but many Unix workstations in those days had a whooping 2 to 8 MB, so we could reasonably expect to fit some interesting software in 640KB. The problem was that most of that code was crappy (sorry for the fan[atics] :-). Most often, it was written from the ground up with some assumptions, like sizeof( int ) == sizeof( long ) == sizeof( void* ), which simply didn't [down]scale well to poor MS-DOS. You could certainly port such code (in a few cases I did), but it was a long, boring, error prone activity.
Well, guess what? A lot of C/C++ code today is still based on the same assumptions. Moving Windows to a 32 bits model removed all those pesky memory models, but allowed people to keep, or learn, old bad habits. Not to mention assumptions about data types alignment constraints, which are usually ignored in the Intel side of the world.
Bottom line? Expect quite a bit of software to require significant time to be successfully ported to a 64 bits model. Even more so if some third-party component is involved, but that's pretty much obvious.
As usual, we could learn a little more by looking outside the WinTel world once in a while. Hewlett-Packard, for instance, published a little book on the subject, HP-UX 64-bit Porting and Transition Guide back in 1998. Some chapters are individually available in HTML, but I'd suggest you get the complete book in PDF (top-left link).

Comments:
Ciao Carlo,
perche' non ci spieghi come e se cambiera', con i 64 bit, la vita del programmatore medio, cioe' quel (semi)professionista diffuso in molte aziende, che si arrabatta con VB, Delphi, C#, si tiene lontano dai puntatori come il diavolo dall acqua santa, new neache a parlarne etc etc.

e invece come cambiera' la vita del programmatore un po piu' evoluto?

Ciao Grazie e complimeti per il Blog
 
E' un ottimo spunto! Mi aspetta una settimana logisticamente piuttosto complicata, con tanto di partenza domenicale :-), ma se riesco scrivo qualcosa in proposito.
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?