How was the transition to 64 bits handled on Linux/Unix? The Windows world still seems to have issues with it and I'm curious how it was handled in the *nix world.
The work required to make the kernel 64-bit was done a looooong time ago using DEC Alpha systems. Programs, however, are a different matter.
The general consensus that I've seen so far seems to be:
/lib64directories for systems that have mixed binaries
- Compile as 64-bit; if compilation fails, recompile as 32-bit until the source can be cleared for 64-bit.
Other than that, you're really not going to see a whole lot of "grief" from mixed 32/64 bit builds.
Windows and *ix used different data models for the transition. This UNIX.org page is a bit old, but it still provides a good overview of the trade-offs (note that
long long was later added to C99, and was required to be at least 64-bit). You can also see a Wikipedia article on the same topic. As advocated at the end of the UNIX.org article, most UNIX-like systems have gone with LP64, which means
long long, and pointers are all 64-bit.
Windows went with what's called the LLP64 data model, which means that only
long long and pointers are 64-bit.
long remains 32-bit. Part of the reason was simply that they didn't want to go through and fix broken code that assumed
long fit in an
As Linux distros is mostly OpenSource there is largly transition already done. Unless you use propertary software (such as skype) you can run pure 64-bit system without any disadvantages.
However the real difference IMHO is more propertary vs. open then unix vs. windows as it is usually the open source software that is ported first (some volonteer needs to recompile something - maybe fix some compilation issues) - or in most cases not ported at all but just recompiled ;) - and propertary that is ported last.
Possibly additionally on Linux you have repos so the installation is handled automagically - you don't need to choose 64-bit or 32-bit version (system chooses yours automatically). On Windows programs are downloaded and having separate 64-bit and 32-bit version:
- Doubles the size of files on server
- Requires of user to know his/her version. Or even that they differ by something
I guess that's the reason why Windows binaries are usually 32-bit - it is one-size-fits-all and not everyone have gone to 64-bit version.
Actually, try "The Long Road to 64-bits" at ACM Queue: http://queue.acm.org/detail.cfm?id=1165766 That was later picked up by Communications of the ACM. The first 64-bit micro was MIPS R4000, shipped in SGI Crimson 1Q1992, Dec Alphas shipped late that year.
R4000s were running at first in 32-bit mode, then later in 64/32 mode, i.e., 64-bit OS, 64 or 32-bit user codes. Alphas always ran UNIX in 64-bit-only (a reasonable choice, since there was no installed base of 32-bit apps.)
Later in the 1990s, SGI contributed effort to 64-bit-ize Linux (to run on Itaniums), about the time XFS was ported to Linux (it really wanted 64-bit).