3

I'm building a minimal "appliance" via SuseStudio (OpenSuse 13.x) - nothing fancy... just running some emulators on it. I'd like the OS to be compatible with as many workstations as possible so I'm leaning towards 32-bit for older processor support. Assuming that I will not be doing anything memory intensive, is there any other reason why I should use 64-bit instead?

Can I be reasonably certain that a 32-bit OS will still work on a modern desktop?

  • 1
    If you give your software a Free-Software licence (and therefore provide source code, and a build script), then people can build it for what ever CPU they have. If it does not have a Free-Software licence then why would anyone use it? – ctrl-alt-delor Jul 21 '16 at 22:17
4

To answer your last question first, x86-64 CPUs (a.k.a. Intel 64, AMD64, x64...; basically any laptop/desktop 64-bit CPU you can get these days) are fully backwards-compatible with 32-bit operating systems and applications. So a 32-bit OS will work on a modern desktop.

As to why you should use 64-bit instead, the 64-bit instruction set adds various features which allow compilers to generate faster code (notably, there are more registers and they can store far more values), so the same application built for x86-64 will often run faster than when it is built for 32-bit mode on the same CPU. This does come at the cost of using more memory for pointers, but the speed increase usually outweighs the pointer cost.

For far more information on all this, check out Wikipedia. You may also be interested in x32 which enables 32-bit software to use the speed-enhancing features of 64-bit CPUs without the pointer cost (but they only run on 64-bit CPUs); Wikipedia also has details.

2

I am assuming that your question is about x86 processor.

Here is a compromise solution, that is used on Debian 32 bit. Produce the whole system for 32 bit, but also add some extra kernels: pea-kernel is 32 bit, but can address more than 4GB ( in theory up to 64 GB ) of physical memory, but only 3GB of logical (3GB per process, 1GB is used by kernel). 64-bit-kernel can also address more that 4GB of physical memory, and 4GB of logical per 32-bit process. 64-bit kernel is simpler than pea, and may be more efficient.

The kernel is relatively small, so having a selection will not add much to the size of your system (you only need install one). However it can make a large difference, to systems that have the hardware.

  • Thanks. Just to be clear though, I'm NOT worried about memory utilization and am certain that I won't exceed the memory cap for 32-bit. – Mike B Feb 7 '15 at 22:29
2

Can I be reasonably certain that a 32-bit OS will still work on a modern desktop?

Yes. Almost all 64-bit capable processors support both 64 bit mode or 32 bit mode.
(Exceptions might be early Itaniums, IBM power CPUs etc, but nothing mainstream.)

Assuming that I will not be doing anything memory intensive, is there any other reason why I should use 64-bit instead?

Yes, there is. In 32 bit mode you can address up to 4GiB of memory. That is up to 4GiB virtual address space. If you fill all of that with physical memory than you no longer benefit from proper address space randomization. That might not be a big problem on systems with 128MiB or similar low memory, but you are sacrificing some security by using 32-bit mode and lots of memory.

You might also miss some features which are only available in 64-bit mode. An example of that which might impact security is the NX bit. This is not in all 32 bit CPUs. Though this has more to do with the age of those CPUs than with 64 or 32-bit mode.

Update 3 years later (2018). We are now reaching the point where the next version of EFI will be 64 bit only. That might change things.

  • NX is available in 32-bit mode when using PAE, even on some pre-64-bit CPUs; the Wikipedia article you linked to has the details. – Stephen Kitt Feb 7 '15 at 22:07
  • @StephenKitt, last I checked, activating PAE carried a huge performance penalty: programs run at about 70% of non-PAE speed. – Mark Feb 8 '15 at 5:19
  • Much of what you say is specific to x86 processors. Many other types have had nx bits for decades, even some some 16 bit cpus. Also address space randomisation does not depend on quantity of RAM; It is done in virtual memory, not physical. – ctrl-alt-delor Jul 21 '16 at 22:21
  • You are acorrect that I made the assumption that we were talking about x86. I mentioned others, but focussed on x86. As for randomization: on X86 without PEA, aren't you limited to 4GiB virtual ? – Hennes Jul 21 '16 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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