cancel
Showing results for 
Search instead for 
Did you mean: 

General Discussions

janagewen
Challenger

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.

0 Kudos
20 Replies
hardcoregames_
Big Boss

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

0 Kudos
janagewen
Challenger

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.

0 Kudos
hardcoregames_
Big Boss

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.

0 Kudos
janagewen
Challenger

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.

0 Kudos
janagewen
Challenger

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.

0 Kudos
janagewen
Challenger

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

0 Kudos
hardcoregames_
Big Boss

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

0 Kudos
janagewen
Challenger

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.

0 Kudos
janagewen
Challenger

Re: 32-bit kernel, 64-bit applications

64-bit.png

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!

i64.png

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.

0 Kudos