To view parent comment, click here.
To read all comments associated with this story, please click here.
It is achievable via the same method as process switching. When a 64-bit process's thread[s] is[are] going to get some CPU, the kernel switches the state ( as always ), but sets the CPU into 'long' mode, for 64-bit operation. It switches back upon the end of 64-bit execution. This means the insertion of only a little bit of data to identify a process as being 64-bit, and to naturally identify each of its threads as requiring 64-bit mode. Rather simple, really.
The kernel simply provides a few short commands to the CPU before a 64-bit thread is executed, and a few more after-word. I long expected this would be possible, and maybe even useful - depending on the time required to make the 32 to 64-bit switch ( which obviously isn't very long - maybe a clock cycle or two ).
--The loon





Member since:
2006-05-02
Thanks, you're indeed right. Especially your second link provides some insight. The more I'm thinking about it, I find the Wikipedia page about x86-64 somewhat contradictory:
(...) It is used by 64-bit operating systems. (...)
which makes it sound as if only 64 bit operating systems can use the 64 bit features of the CPU (and which, in retrospect, also raises the question what constitutes as a "64-bit operating system").
Later, in the Mac OS X section, they claim that Mac OS X v10.5 uses the 64 bit capabilities of the CPU and also that "The kernel is 32-bit."
Hm. I guess I should put my thoughts on the Wikipedia x86-64 Talk page...