Alright, I'll respond to your two posts and then that's it for me since I've grown tired of providing facts only to be countered with your vague, incorrect and unverifiable assertions. Unless you provide something substantive in response I'll be gone.
AidenShaw said:
What this is is 32-bit Windows running a 64-bit application. The 64-bit application happens to be a virtual machine monitor, but it's a 64-bit task running on a 32-bit OS.
The CPU has to switch between 32-bit mode and 64-bit mode everytime it runs the VMM.
The 64-bit application here is the 64-bit guest operating system. I'll reiterate again, running the processor in 64-bit mode requires a 64-bit OS - the VMM or hypervisor puts the processor into 64-bit mode and then an operating system must manage the processor while in this mode. If you wanted to run other "applications" in this way then each application would have to do everything an operating system does - manage context switching, memory management, scheduling, etc. Each "application" would basically be a small operating system incurring extra overhead. This would be a huge kludge, so much so that it is impractical as each 64-bit "application" would be a mini operating system and dramatically increase overhead on the machine.
At any rate the 32-bit operating system is not running 64-bit applications, the 32-bit OS is running an application that virtualizes a 64-bit environment that then runs a 64-bit OS and subsequently 64-bit applications (whew, what a mouthful).
Reference
Operating modes for more details.
For additional proof and reading, please take a look at AMD's
AMD64 Architecture Programmers Manual Volume2: System Programming (PDF). Describing Long Mode (64-bit mode) in 2.1.1, page 29:
To use 64-bit mode, a 64-bit operating system and tool chain are required.
For information on how to put the processor into Long Mode read 14.6.1
Activating Long Mode, page 427:
Switching the processor to long mode requires several steps. In general, the sequence involves disabling paging (CR0.PG=0), enabling physical-address extensions (CR4.PAE=1), loading CR3, enabling long mode (EFER.LME=1), and finally enabling paging (CR0.PG=1).
Specifically, software must follow this sequence to activate long
mode:
1. If starting from page-enabled protected mode, disable paging by clearing CR0.PG to 0. This requires that the MOV CR0 instruction used to disable paging be located in an identity-mapped page (virtual address equals physical address).
2. In any order:
- Enable physical-address extensions by setting CR4.PAE to 1. Long mode requires the use of physical-address extensions (PAE) in order to support physical-address sizes greater than 32 bits. Physical-address extensions must be enabled before enabling paging.
- Load CR3 with the physical base-address of the level-4 page-map-table (PML4). See Long-Mode Page Translation on page 160 for details on creating the 4- level page translation tables required by long mode.
- Enable long mode by setting EFER.LME to 1.
3. Enable paging by setting CR0.PG to 1. This causes the processor to set the EFER.LMA bit to 1. The instruction following the MOV CR0 that enables paging must be a branch, and both the MOV CR0 and the following branch instruction must be located in an identity-mapped page.
Leaving Long Mode (found in 14.7, page 429) is a similarly long and complex process.
Note that this is nothing like the "mode bit" that you claim can be set on a per-process basis. The CPU can run in either 32-bit Legacy mode or 64-bit Long mode, it cannot run and/or use both modes at the same time. In order for VMware to work as it does it needs to be constantly switching the processor in and out of 64-bit mode - switch to 64-bit mode and let the 64-bit virtualized OS run, then switch back to 32-bit mode and let 32-bit Windows do what it needs to do (and back and forth). Also note that this is much more complex and resource intensive than a simple context switch from one thread/process to another.
AidenShaw said:
Short term problem during the transition from 32-bit to 64-bit. With Vista, Microsoft aims to make the 64-bit version the logical one to run if you have 64-bit capable hardware.
Just as today you should put off a MacIntel purchase until your necessary apps are fat binary, you should (today) stick with 32-bit unless you have 64-bit drivers for your necessary hardware.
Short term and yet today, over a year after 64-bit Windows was released, there is limited support for 64-bit drivers and Vista is still more than 6 months away (at best). All the while Tiger has been out for over a year featuring 64-bit support and not requiring any new drivers or any other painful transition for users.
You do now seem to concur with my original reason for bringing up 64-bit support - that in addition to the current PPC to Intel transition there will be yet another 32-bit to 64-bit transition for users to go through.
AidenShaw said:
kuwan said:
Wouldn't it be nice if the operating system could remain 32-bit but still support 64-bit applications?
No, that's a limited kludge. A stepping stone to true 64-bit support - especially in the lame OSX implementation where most of the libraries and frameworks can't be used from a 64-bit app.
It's not a limited kludge, it's a great feature that takes advantage of one of the great design advantages of the PPC platform. I agree though that Apple has limited its usefulness by not providing 64-bit versions for most of the libraries on Mac OS X. Had they provided a complete set of 64-bit libraries then this would be "true 64-bit support" in every sense. There's no reason that the OS kernel needs to be 64-bit, it certainly doesn't need to access that much RAM itself, unless of course the processor needs a 64-bit OS in order to run 64-bit applications.
AidenShaw said:
IMO, Apple should have waited for Core 2 and made OSX for Intel 64-bit only. Selling Yonah was a mistake that will hurt for years.
I agree with this 100%. It now means yet another transition for both developers and users. That would have meant waiting for Leopard in addition to Core 2. And since Leopard probably won't be coming until next year I guess Apple decided they couldn't let their laptop line stagnate for that long. We all get to pay the price for years to come.
AidenShaw said:
The "mode bit" that controls 64-bit operation is a per-process attribute - whenever the scheduler gives a CPU to a thread the thread's mode bit setting is used.
There is no such "mode bit". As described above the processor can either run in 32-bit Legacy mode or it can run in 64-bit Long mode. If you want to mix modes as VMware does then you need to constantly switch the processor between Legacy mode and Long mode. Note that this is a serializing operation that requires the processor to completely flush whatever it is doing before it can make the mode switch - a time-consuming and performance-degrading operation. This is not a per-process attribute, the CPU can run in either one mode or the other.
AidenShaw said:
Tiger's lame 64-bit implementation could easily be run on x64 processors - the VMware application proves that.
Not without providing either 1) a separate 64-bit kernel to run 64-bit applications - in essence you'd have two operating systems running (32-bit Tiger and a separate 64-bit kernel for 64-bit apps) or 2) requiring each 64-bit application to be its own mini OS. Neither option is practical and requires too much overhead.
The bottom line is that with x86-64 you need a 64-bit operating system in order to run 64-bit applications. And this means yet another transition for developers and users.