up vote 3 down vote favorite
1
share [g+] share [fb]

Which OS (or distributions) comes with 64-bit kernels (x86_64, SPARC64, PPC64, ..smth else?..) and 32-bit userland?

I want all small userspace programs (like ls, cat, etc) to be 32-bit, because they really no needs to be 64-bit. But OS kernel must be 64bit for using >=3 Gb of RAM. Also database programs (when using a lot of memory) can be 64bit.

64bit mode can hurt some programs, makes them bigger, eating (wasting) memory on pointers (especially in big abstract datatypes like list, tree, etc).

64 bit programss WASTES twice memory on EACH Pointer. I don't want it.

And the Question is not "Are the 32-bit programs needed when 64-bit porcessor is available". Question is "What OS comes with 32 bit userspace and kernels in 32/64 bit mode". Examples of such OS includes: Solaris/SPARC64, MACOSX/X86_64 (10.5)/....

link|improve this question

67% accept rate
2  
The question is why? "I want all small userspace programs (like ls, cat, etc) to be 32-bit, because they really no needs to be 64-bit." makes little to no sense to me. – user2368 Feb 6 '10 at 14:30
7  
@osgx You greatly overestimate the "negative" impact of 64-bit programs. – phoebus Feb 6 '10 at 16:00
1  
@osgx depending on the processor and kernel the CPU is most likely thunking your 32 bit code into 64 bits becaue that's what the processor instruction set is. 32 bit programs can be slower on 64 bit processors (including the OS) – Jim B Feb 6 '10 at 16:41
1  
@osgx - it's part of the intel optimization guide- first see Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 1: Basic Architecture then see section 9.2 x64 optimization guide intel.com/products/processor/manuals Now there are some processors that have better performance under 32 bit mode rather than 64 but that only applies to pre-core archtecture processors. In that case you would want to run a 32 bit OS rather than 64 ..cont below – Jim B Feb 6 '10 at 19:02
1  
you chopped off the relevent bit from section 9 ( and which is mentioned in the basic architecture guide all over the place "The default operand size for most instructions is 32 bits. The behavior of those instructions is to make the upper 32 bits all zeros." you do save an instruction byte but not any memory. They show you an example with the 64 bit and 3 bit instructions doing the same thing, and below that they mention once again "To access the data in registers R9-R15, the REX prefix is required. Using the 32-bit form there does not reduce code size." cont... – Jim B Feb 7 '10 at 0:47
show 6 more comments
feedback

2 Answers

Current consensus seems to be that you are worrying needlessly. 64-bit is fine, and do not take up much more space than 32-bit to be of any significance. On a couple of my systems here:

What    64-bit Size 32-bit Size
/bin/ls        101K         91K
/lib/libc.so   1.4M        1.3M
/usr/bin/php5  5.5M        5.1M

See – not that significant. Also, 64-bit pointers are more useful than you might think.

link|improve this answer
64bit pointer is wasting of memory, of cache lines, of memory bandwidth. It is overkill, because only 40-50 bits of memory addressing is really implemented in hardware, and because I don't allow each program to use >=3-4 GB of RAM. I want allow computer (and OS) to have >=3-4GB of RAM and use 64bit mode for selected applications. – osgx Feb 6 '10 at 17:00
In linux and many other unixes there is a mmap64 system call to using >4 GB mmaped files. Yes, such files can't be mmaped entire file at once, but THERE ARE a little number of programs which really needs such files to be mmaped. "cat", "dd", "bash", even "gcc" does not have to be 64-bit. – osgx Feb 6 '10 at 17:07
feedback

I'm running an 64bit KVM server, which is hosting several virtual servers (debian/woody - debian/sqeeze and Windows XP). the virtual linux-server have 32bit Userland and an 64bit kernel (aptitude install linux-image-2.6-amd64).

So I think you can install every current linux distro and run an 64bit kernel on it - I have no problem with this setup.

link|improve this answer
Hmm. Do you install entire 32-bit os? Can you use gcc for 64-bit mode? Is there 64 and 32 bit libc for large programs which must be 64bit, like multi-gb database? – osgx Feb 6 '10 at 17:51
1  
Yes, I install pure 32bit OS and afterthat I install the 64bit kerneö (which has no dependencies under debian!). I haven't used compilers in those VMs - sry. – ThorstenS Feb 7 '10 at 13:31
feedback

Your Answer

 
or
required, but never shown

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