Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
With flying colors. –  Kaz Oct 30 '13 at 5:53
add comment

4 Answers 4

up vote 12 down vote accepted

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:

  • Separate /lib and /lib64 directories 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.

share|improve this answer
    
Plus symlinks to keep the binary names constant and consistent. –  geoffc Aug 11 '10 at 1:05
    
and we have what's called multilib alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib –  phunehehe Aug 11 '10 at 6:41
    
Could you name any program on Linux that can be compiled but only on 32-bits? –  Maciej Piechotka Aug 18 '10 at 14:47
    
@Maciej Piechotka: don't think there are a lot of those left. I think I remember OpenOffice.org being tricky, but that was way back when the conversion to 64-bit started. Other than that: apparently Flash Player is tricky :P –  wzzrd Aug 18 '10 at 14:56
    
Since when Flash Player is compiled ;) gnash/lightspark works on 64-bits but Adobe Flash Player is propertary. –  Maciej Piechotka Aug 19 '10 at 16:17
show 4 more comments

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 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 int.

share|improve this answer
2  
There was a lot of debate in the Unix world, also. One of the arguments in favor of adding "long long" was that there was far too much code out there that assumed that "long" was 32 bits. (At least in the particular argument I got into on comp.std.c not too long before the C99 standard.) –  David Thornley Aug 18 '10 at 15:14
add comment

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.

share|improve this answer
add comment

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.