Combined architecture 32/64bit

written by Tomas M. 282 days ago

There appears to be a very interesting possibility, which I never considered before. It is actually possible to detect - during the boot time - if you are booting the OS on a 64bit system or not, and thanks to this, the boot loader can automatically choose the right Linux Kernel image - 32bit one on a 32bit computer, and 64bit one on a 64bit computer. Furthermore, as I tested already, a pure 32bit operating system (binaries and libraries) can run without any problem on a 64bit computer while even the running kernel is 64bit (!) too. (The 64bit kernel is necessary when you want to access more than 4GB of total RAM).

To sum it up, it is actually possible to package a 32bit operating system, with two kernels (one 32bit and one 64bit) and then boot this OS in a way that it will automatically select appropriate kernel for the given machine it runs on, while all the userland processes (programs) will be 32bit (thus smaller, and loading faster, when running from CD or a flash drive).

Smaller and faster. That sounds great. What are disadvantages?

Disadvantage of having a 32bit-only system is that any process can not allocate more than a few gigabytes of RAM (if I understand this properly). For a Live OS such as Slax, we don't really need to allocate more than that for any particular process. If you do then you'll probably use some other OS anyway.

Another disadvantage may be that when the software (programs) is compiled for 32bit processors, it will not use some newer (and probably more optimal) instructions, which were added only to the newer 64bit processors and are not available for, say, i486 instruction set, thus there can be some performance penalty. I assume this will not be any significant problem for a Live OS such as Slax again, since if user really needs to gain the extra few percentages of performance, he or she will probably be using some other OS anyway.

Having only one Slax version (32bit OS, with extra 64bit kernel included, which adds only around 20MB to the total OS size), would save me around 40% of the development time needed to package and distribute two variants 32+64, so I'm definitely open to try this out. It also simplifies decision for users, who do not need to care about the architecture, and they can safely use single Slax on all their machines.

Let me know please your thoughts on this. Thank you

Tomas M.

(c) 2017, Tomas M; rss