20 Replies Latest reply on Feb 7, 2017 2:20 PM by hardcoregames™

    32-bit kernel, 64-bit applications

      32-bit kernel, 64-bit applications, that is the most mysterious thing to me, especially when I first got in touch with Mac OS X Leopard, ten years ago. How can a computer running under 32-bit mode executes 64-bit applications? That is quite rare for modern computing systems. But when I was a teenager, this kind of things were quite often, especially when I was sitting in front of MS-DOS 6.22 with full of fantasy dreams. So many applications, especially game applications would bring up the processor from the real mode to the 32-bit mode to utilise the 8MB system memory. Even under Windows 3.x, with help of Win32s API pack, several 32-bit applications would also be executed under 16-bit Windows. When the days show the sunshine towards Windows 9x, 16-bit drivers could also hook the 32-bit system backwards to real mode, and then with that hook the system could get back to its 32-bit world. But those are the stories of the passed, what about a 32-bit kernel running 64-bit and 32-bit applications? It seems almost impossible for AMD64 architecture, one could easily figure out the actual architecture lies on the Long Mode, especially for its 64-bit sub-mode. Because the compatibility mode is just an associated mode, provided as a replacement of x86 engine found on Itanium processor. AMD64 is not 64-bit version of x86 or IA-32, it is just itself, provided for competing against Itanium architecture, and won!




      What is the real 64-bit version of IA-32? That might be the abandoned project ever kept secret in Intel, Project Yamhill. For years, I repeated embrace a question, why Microsoft had no lust to release a third 64-bit version of Windows XP, especially when Windows NT already provided many and many ports. Porting Windows NT on other platforms is a not a hard job for Microsoft, but the problem lies on the extensibilities of Windows NT on different modes. Windows 9x could seat themselves on different modes easily, but Windows NT lack of that flexibilities. Like traditional UNIX, Windows NT is more or less like a dictator, it does not allow the ruled world with more than one system. The product of project Yamhill might possibly be like expansion of IA-32 or IA-32e, not additional mode. When it is enabled, the processor turns into the 64-bit version of IA-32, registers turns into 64-bit, instruction pointer into 64-bit and so forth. When disabled, it come back to the traditional IA-32. This thing does not require Microsoft to port the Windows XP to a third 64-bit version, but extend the current 32-bit Windows XP to support 64-bit applications. Like what I said above, Windows NT is like a dictator, it would never allow such thing happen. That might be the very reason, Project Yamhill eventually aborted. I believe it does really exist on the first generation of Prescott processor, for its large transistor numbers without considering meaningless backdoors.


      Windows NT never supports more than mode, but containers, many containers provided to support those things in an emulated or almost emulated form, such as NTVDM provided for emulating the DOS applications, WoW for 16-bit Windows applications, and WoW64 for 32-bit applications.  




      Mac OS X Leopard, Snow Leopard and Lion provide a kind of very special 32-bit kernel, enabling 64-bit applications to be supported incredibly! With help of virtual machines and/or cracks, I successfully run those O/S on the Celeron E3200 processor, a very common and budget processor. In other words, the processors soldered onto Macintosh computers are nothing special. And one more thing could also be inferred that the final product of Intel 64 is more or less an AMD64 clone, rather than another architecture. So Apple ever did a very crazy thing, and this so-called 32-bit is essentially a 64-bit code only left part of it realised under the compatibility mode. When a Macintosh computer equipped with only 32-bit EFI firmware, the 32-bit version of boot.efi is loaded. But it could check processor whether 64-bit enabled, if so, it load the second version of 32-bit kernel, which further trap the processor upwards to the IA-32e mode (Long Mode), rather than just stay under the protected mode. So that is only a trick, not something like found for most UNIX systems, such as AIX 4.x, 32-bit kernel support 64-bit applications. Those OSes just bind two different things (IA-32 and AMD64) intentionally and artificially.

        • Re: 32-bit kernel, 64-bit applications

          OS X us built on a 64-bit version of BSD Unix underneath


          Pretty much every CPU since about 2005 has been 64-bit capable and more recently now mobile phones are using 64-bit processor cores


          The Celeron E3200 is 64-bit capable

            • Re: 32-bit kernel, 64-bit applications

              Thank you for your reply, I started get in touch with Mac OS X since 2003 with an iBook then. Later in 2006, the very time I tried Jas hacked version of Mac OS X 10.4.6 on an AMD processor based machine. They underlying core is rooted onto the 32-bit platform. Then there was Open Darwin, which is an open source project. Like so many other Mach O/S, the BSD plays as an in-between layer with some parts present on the core, some on the user interface (touched by programmers and end users). Job's NeXT is just based on that kind of Mach O/S, put their graphical environment on the above. After Steve came back to Apple, technologies of NeXT are brought onto the Macintosh systems, with partial FreeBSD replaced that BSD layer for copyright problems.


              Mach is mach, BSD is BSD, and FreeBSD is FreeBSD. Darwin is not FreeBSD, but realised so many presumptions Apple ever did for their aborted Macintosh OS 8, even advanced multitasking capabilities, and ideas borrows from UNIX. UNIX is the very thing towards Apple, the flame was started even earlier than that, you know the A/UX, yeah, the Darwin is the best realisation than any other thing for modern Apple Macintosh systems.


              The Darwin plays as an underlying supporting layer, rather than the real nature of macOS or iOS. This point is very important! The underlying core of PlayStation 3 O/S is also based on FreeBSD, and PlayStation 4 (Pro) based it much more largely. One does not need to find those drivers of AMD GPUs on it, because it plays nothing towards the real FreeBSD system.

            • Re: 32-bit kernel, 64-bit applications

              What is an Architecture? What is a Processor Architecture and what is an Instruction Set Architecture?




              In building architecture, architecture is the metal structure, all other things are building around it but could never change it. No matter how to decorate, the inner beauty could never be modified, and that is the only thing consolidating everything tangible in its unique style. Like that, processor architecture is the unique style, in which all its molecule are organised (building up a processor), and one could get in touch with it (utilising instruction set). The innocent beauty of love in teenage we found, because then we were innocent, and we could touch everything we see directly; but make-ups and perfumes would always confuse the essence of beauty of love when we were no longer innocent. From the simple to the complicated, the processor architecture has become two completely different things, one facing how to build up a processor, it becomes Microarchitecture; the other facing with the programmers, the instruction set architecture. Instruction Set is tangible, but architecture isn't. So please do not confuse Instruction Set and Instruction Set Architecture.



              People programme the processor with the instructions from a specific instruction set, but those instructions are organised and built onto that architecture.




              What is AMD64, x86-64, x64 and/or Intel 64?





              AMD64 is a 64-bit Instruction Set Architecture (ISA) designed by AMD for their 64-bit Hammer and later processors. It is similar as the IA-32, developed by Intel for their processors, but 64-bit computing prepared.





              x86-64 is another name of AMD64, emphasising its nature similar as x86, but 64-bit computing.





              x64 is not an ISA name, but a system name, first introduced by Microsoft for their second 64-bit O/S products besides Itanium. It is short for 64-bit extended system.

              From a standpoint of computing system, people are much more interested in the applications they have already spent too lot. Such system maintains the support for those already purchased applications while extending them on the 64-bit computing platform.  Obviously, all those 32-bit applications are extended by the windows calls, which is further implemented in 64-bit codes on x86-64 processor.





              Intel 64 is not officially an ISA, but AMD64 clones from Intel.

              Because AMD64 architecture is similar as IA-32, and reuses IA-32 instruction set in the compatibility mode and legacy mode of AMD64 processors, Intel has everything to name their processor as Intel 64, even though cloning AMD64 instruction set.

              Until Mac OS X 10.7, Apple refers the 64-bit instruction set as Intel 64-bit, even though there is no more PowerPC counterpart from all aspects. Since Mac OS X 10.8, it changes it to x86_64, not emphasising Intel anymore.

                • Re: 32-bit kernel, 64-bit applications

                  Intel went for the Itanium which was not binary compatible, while AMD did another register stretch and expanded the microprogramming


                  AMD64 was then licensed by Intel as part of a cross licensing deal


                  Today all processors are derived from AMD64 and this seems to be the instruction set looking forward, compilers are slowly becoming capable of leveraging the modern CPU effectively.

                    • Re: 32-bit kernel, 64-bit applications

                      Well, allow me to be frank! This age, is just a 64-bit transitional age, not a real 64-bit computing age. Because so many things are just the 64-bit version of 32-bit computing base, simply expanded rather than the real 64-bit computing which people ever expected about 20 years or even longer before...

                        • Re: 32-bit kernel, 64-bit applications

                          Given a computer is a very durable unit, even my old Toshiba Celeron 700 still works. Machine is old enough to have a floppy drive.

                          It can run XP but it's better with Windows 98SE


                          I used FreeBSD back when it was the only 32-bit choice when DOS was all the PC had available


                          I have seen a few transitions from 8 bit, 16 bit, 32-bit and now 64-bit

                            • Re: 32-bit kernel, 64-bit applications

                              Celeron 700, is that Coppermine, reminding me of the very first year of high school. That is an excellent processor, the best choice for this processor is Windows 2000 rather than Windows 98SE/Me, if 64MB or larger system memory configured, if without consideration on games which requires Windows 9x. In late 2000, I compared many popular applications such as Office 2000, WinZip, Need for Speed 5, Age of Empires II and many more on Windows 98 SE/Me and Windows 2000, the performance looked quite perfect for the latter. Of course, it is on an Celeron 533 Mendocino, a lit bit weaker than your processor. FreeBSD, I am not accustomed with it, the very first release I got into touch with is FreeBSD 5.3 AMD64 in 2004 or 2005. The installation is not friendly and very slow. Then I loved to use Red Hat Enterprise Linux ES 3, yeah it is my beautiful season.  


                              Like average kids in our time, I played lots of games on 8-bit Nintendo Family Computer, learning to use MSDOS to format a disk or PCTools to correct bad tracks, when I was so close to the 16-bit DOS, Windows 3.x was also my favourite with which I started to enjoy music and TV Shows on computer. As to the 32-bit age, well, like so many others then and now, Windows 95/OSR2/98/98SE/Me/2000/XP, I experienced all of them. I also enjoyed Linux once, especially for Mandrake Linux, because so many games I could play out of box.


                              64-bit age, a sad age, at least to me. My very first book on 64-bit architecture that I chose when in college was a book on Itanium. So many things charmed me too a lot. I got a disc from HP with IA-64 simulator for Linux on it, but I could not find proper Linux distribution for it. Excellent but with some a little bit disappointment. I had many dreams once dreaming customised on Itanium workstation to enjoy the Itanium version of Windows XP. When I started chasing it, it was dropped completely, in favour of Windows XP Professional x64. AIX 5.3L is another interesting but headache thing to me, black and white. Thanks to PowerVM x86, I tried many 32-bit x86 applications on Red Hat Enterprise 4.7 PPC. But at least it is still a server, rather than some a desktop that could be used to enjoy the enjoyment rather than the noise produced by so many fans. Solaris 10 was the very first commercial Linux could be downloaded from the Internet directly, but for its poor performance on GUI, I stopped making fantasy dreams.

                      • Re: 32-bit kernel, 64-bit applications

                        What is IA-32? What is x86? What is IA-64? What is IPA?



                        IA-32 is the 32-bit Instruction Set Architecture developed by Intel for their processors, starting from 8086.




                        x86, like x86-64, is not officially an architecture name, but used to referred to a bundle of processors and their instruction set which are IA-32 processors and their clones. At beginning AMD semi factory also manufactured Intel processors, and named some products with AMD brand, such as AM286/386/486. They are the strict clones of Intel processors. Cyrix, once another stronger player, designed processors which could fit onto Intel 80386 motherboards from the scratch. So they are the loose clones of Intel processors, without any product from Intel except for the Instruction Set. Their very famous Cyrix 486DLC/e once delighted my life when I was a teenager. Like today's AMD, Cyrix was a fabless company, they just designed the processors, but manufactured by other semi factories, such as Texas Instrument, IBM and later National Semiconductor. NS once released a Cyrix designed processor, with processor core, graphics, north bridge and so on integrated onto a single chip. That chip might be the ancestor of today's APU, and AMD later bought everything around that processor. The AMD Bobcat microarchitecture resembles from many aspects yesterday's Cyrix design. WinChip/Centaur is another player later also bought by VIA for designing their VIA Cyrix processors. No matter Cyrix or Centaur, their processors never beat Intel ones from the aspect of performance but the price. AMD is different, they also designed different instruction set extensions, such as 3D Now! sub instruction set, which further boost their processors to compete against Intel processors. Those additional instruction sets are not belonged towards IA-32 instruction set, so x86 is often used to referred to processors without bounded by Intel products and their limits.




                        IA-64, is the real 64-bit Instruction Set Architecture, designed by Compaq DEC, later bought by HP. HP continued their work and cooperated with Intel, the latter assist it onto the semi power and continued its architecture design. So IA-64 could be interpret as 64-bit Instruction Set Architecture, where the letter "I" is often mistaken as "Intel". IA-64 is a completely different architecture from IA-32, from all aspects. There is no compatibilities, but its advanced ideas around it, charming the market too a lot. But the question is just like that too many considerations and efforts should be put onto bandwidth (PS3/PS4) or structured supporting software layer (Xbox 360/Xbox One)? IA-64 provides the developer with even more room to optimise the performance from the Instruction level rather than the microarchitecture. The very initial purpose of .NET framework is not only provided competing against Sun Java platform, but also embraced an ideas with some a just-in-time compiler to boost such intelligent platform. But in fact, to manage applications on such architecture is proved to be even difficult.




                        IPA, is short for Itanium Processor Architecture. Like SPARC, IA-64 is an open architecture, with the wishes that more and more semi power would be involved into it to accelerate it succeed onto the markets. But not as the expected before, there is only one manufacturer stick to it, and that is Intel. Intel continued their own work onto this architecture, and name the architecture name of their own implementation as Itanium Processor Architecture.

                        • Re: 32-bit kernel, 64-bit applications



                          Just now I just compiled a simple 64-bit programme and run under Mac OS X 10.7 32-bit. Using simple commands from UNIX (or FreeBSD exactly) Shell, such as file and uname to retrieve the interested information, wonderfully, it seems that 64-bit application run on 32-bit OS, you can see i386, but tell the truth, it is not a real i386, but perfume and make-ups confusing so many computer science students!


                          I also pasted a screenshot of Apple version of Task Manager, pay attention to the column Kind, Intel (64 bit) . Since OS X 10.8, it changed to merely 64 bit. This Intel (64 bit) is essentially the AMD64.

                            • Re: 32-bit kernel, 64-bit applications

                              Early on Intel used a different branding for 64-bit. Today they everybody simply called it x64 to distinguish i from x86.


                              I have developed many programs for x64 mainly when I needed more main memory for the work, Visual Studio 2005 and onwards support 64-bit builds for Windows XP Professional x64 and above.

                                • Re: 32-bit kernel, 64-bit applications

                                  How can you develop programs for x64, only if you are developing another O/S? Application programmers developed 64-bit applications with x86-64 instructions on x86-64 architecture. Yeah, x64 is used to distinguish from 32-bit x86 system and 64-bit x86-64 system.


                                  Sony PlayStation 4 (Pro) and Xbox One (S) are the 64-bit x86-64 systems, rather than x64 system, the reason is obvious that there is no 32-bit code found on both systems, so there is no that eXtened.


                                  As to the developing tools from Microsoft, I used Windows SDK and Visual C+ 6.0 to compile some simple 64-bit applications on Windows XP 64-Bit Edition for AMD Opteron and AMD Athlon 64 systems. If one only needs large memory than 2GB space, he/she could utilise AWE to retrieve additional memory resources through PAE on IA-32 architecture.

                                    • Re: 32-bit kernel, 64-bit applications

                                      32-bit Windows is difficult to allocate more than small amounts of memory. For example, malloc() will fail even with enough memory available. This is one of the main motivations for quickly taking advantage of XP x64 which had no problems. I can malloc() as much as available memory.


                                      I used to use an Athlon64 CPU and it was equipped with 4GB of memory and only the 64-bit version of Windows could leverage it all. Video card memory sites on top of main memory so where does it have to go when your video card has 4GB of VRAM?


                                      This is why I have used 64-bit Windows since the get go. Even 32-bit games run better, this is due to better memory management and the ability to load Windows system components above the 4GB line,

                                        • Re: 32-bit kernel, 64-bit applications

                                          Yup, your said is right, but not what I want to say on this title. I am interested in the system with limited resources but applicable. If some a day, there would be 128-bit processors on shelves, what about it? I never made any comparison between 32-bit and 64-bit architectures, I just make comparison between IA-32 and AMD64, which are two similar architectures but not one architecture with different versions. As to the performance of computer games, it depends on the types of games, the designs of game console system (hardware and software)  and the most important things, CPUs and GPUs.


                                          Video Card Memory is an exclusive memory system dedicated for GPU, which could not be utilised like system memory, but some provide means to remap partial or full onto the system addressing space. Like most of AMD entry level GPUs which is equipped with 1GB VGA memory,  it just exposes 256MB space on the system. Of course there is another thing, that is the integrated GPU, no matter on the North Bridge or CPU chip, it allocates part of system memory as the Video Memory. Those memory are borrowed from the system memory, leaving part between 3GB towards 3.5GB or above 4GB. They are mapped by the processor addresses mapping system, controlled by firmware (BIOS or UEFI). They are two things, so please do not confuse them.


                                          32-bit games run better on x64 system? Yup and/or no, once again depending on games and the underlying system one configured!

                                            • Re: 32-bit kernel, 64-bit applications

                                              128-bit or wider word sizes are not likely due to the difficulty of designing an ALU to handle that many bits, I like wider word sizes for financial calculations etc


                                              Video card memory uses several memory interface logic blocks to attach memory chips directly, it's designed that way to improve bandwidth. CPU memory is on modules which are further away which does limit bandwidth slightly.


                                              L1, L2 and L3 cache memory is made from static RAM on the CPU die. The amount of cache has increased to be able to increase overall performance. The trend for more cache memory seems like the best route towards the future. Addition cores have diminishing returns.


                                              64-bit windows loads components above the 2GB line so more lower memory is available for games etc. Remember video card memory has to be memory mapped too which is hard to do with the 32-bit address space.


                                              Video cards have long had more than 512MB of VRAM which cannot be leveraged fully except with 64-bit Windows.

                                                • Re: 32-bit kernel, 64-bit applications

                                                  Your reply is appreciated, but your words "Remember video card memory has to be memory mapped too which is hard to do with the 32-bit address space" and "The trend for more cache memory seems like the best route towards the future", no, you are far from the fact.

                                                    • Re: 32-bit kernel, 64-bit applications

                                                      Back in the old days, cache memory was an extra cost item you had to plug into a slot on the motherboard.

                                                        • Re: 32-bit kernel, 64-bit applications

                                                          yeah, yeah, you are right!

                                                            • Re: 32-bit kernel, 64-bit applications

                                                              modern processors are now bolting on graphics which has killed the low end video card market. trends seem to be for more graphics.


                                                              My i3-2100 (sandy bridge) has basic graphics which work fine for most needs. The motherboard by Asus has been a headache. Asus was slow to fix problems with the BIOS and their update program does not work right either. Asus seems to be abandoning and orphaning hardware faster than ever.


                                                              Last board I bought was this MSI 970A-G43 for my AMD CPU and it has survived better than any 2 Asus boards I had before. It has a lot of capacitors but none has blown up yet. I have lots of fans though to remove warm air as best as possible. I have 2 front, one rear and one top exhaust fan.


                                                              My CPU is overclocked to 3.8 GHz which does add to the thermal load a tad. The video card is also overclocked. AMD is popular with overclocking enthusiasts.

                                                                • Re: 32-bit kernel, 64-bit applications

                                                                  I've used lots of motherboards from Taiwanese companies, such as Abit, AOpen, Asus, ASUSTek, Asrock, Gigabyte, MSI, SOYO, TCommate and many many more. Some are still there, some are written into history. Allow me to be frank, I do not like processors which are boosted merely by increasing speed or lengthen pipeline such as Intel NetBurst and AMD Bulldozer.

                                                                    • Re: 32-bit kernel, 64-bit applications

                                                                      I believe the boost was based on the thermal capacity considerations for a given CPU. With a better cooler its possible to overclock my Phenom to 4.0 GHz but windows 10 does not like it so i have to back off to 3.7 GHz to stabilize it.


                                                                      AMD cool and quiet dynamically adjusts the multiplier which can reduce CPU loads, Intel calles advanced speed step.


                                                                      Now I am noticing processors are slowly looking at the front side bus or other transport mechanism which does not have to be run at max all the time.


                                                                      Today CPU and GPU are measured more as MIPS/watt or GFLOPS/watt depending on the architecture needed. This trend will likely continue over time as 14nm moved to 10nm and eventually to 7nm if they can get it working properly.




                                                                      Micron has been scrambling to get below 20nm which already has a mediocre yield. This is typical for the industry.