Hello all,
I am Sylvain Lacombe, creator of Monik
Its a long time I did not work on the project.
I Have a question about the 64bits cpus.
If you are on a 32bits OS, can you still use the advantage of the 64bits cpu or is it emulating a 32bit one or something like that?
Sylvain
64 bits cpus
Moderator: Ras
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: 64 bits cpus
Nope. The 32 bit OS won't put the processor into 64 bit mode, and if you try to do this yourself, the program will crash because the O/S won't know to save r8-r15 when an interrupt occurs, nor would it undeerstand what is going on in an environment it did not establish. Memory paging works differently (page tables), etc.Sylvain Lacombe wrote:Hello all,
I am Sylvain Lacombe, creator of Monik
Its a long time I did not work on the project.
I Have a question about the 64bits cpus.
If you are on a 32bits OS, can you still use the advantage of the 64bits cpu or is it emulating a 32bit one or something like that?
Sylvain
Re: 64 bits cpus
wrong, on MacOs is not a problem, u can have os 32 bits but 64 bits capable.Nope. The 32 bit OS won't put the processor into 64 bit mode, and if you try to do this yourself, the program will crash because the O/S won't know to save r8-r15 when an interrupt occurs, nor would it undeerstand what is going on in an environment it did not establish. Memory paging works differently (page tables), etc.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: 64 bits cpus
I do not see how. 64 bit mode and 32 bit mode are _not_ compatible. If the OS will run a 64 bit application, it is a 64 bit OS. I agree that a 64 bit OS can run a 32 bit application, but not the other way around.hcyrano wrote:wrong, on MacOs is not a problem, u can have os 32 bits but 64 bits capable.Nope. The 32 bit OS won't put the processor into 64 bit mode, and if you try to do this yourself, the program will crash because the O/S won't know to save r8-r15 when an interrupt occurs, nor would it undeerstand what is going on in an environment it did not establish. Memory paging works differently (page tables), etc.
BTW are you talking "snow leopard"? That's a 64 bit OS, through and through. 32 bit OS is _not_ going to enable 64 bit features, They can't, for obvious reasons.
Re: 64 bits cpus
snow leoard have two kernel 32 and 64 bits, you choice when you start (boot)
leopard 32 bits
tiger 32 bits
..../...
and i have no problem with my program (64 bits)
voila
leopard 32 bits
tiger 32 bits
..../...
and i have no problem with my program (64 bits)
voila
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: 64 bits cpus
Still doesn't matter. A 32 bit OS can _not_ put the CPU into 64 bit mode. The extra 8 registers will be unknown. The 64 bit mode uses a 4-level page table lookup to translate virtual-to-real addresses. Etc. If you can run a 64 bit application, it is a 64 bit OS. If you can't, it is a 32 bit OS. Having two is not exactly the same thing, if you have to reboot in 64 bit mode to run 64 bit applications. And I can't see why dual kernels would ever be used. Linux has always had both 32 bit and 64 bit libraries on its 64 bit systems, so that 32 bit applicatoins can use a sub-set of the available hardware and run correctly.hcyrano wrote:snow leoard have two kernel 32 and 64 bits, you choice when you start (boot)
leopard 32 bits
tiger 32 bits
..../...
and i have no problem with my program (64 bits)
voila
But none of that has anything to do with running 64 bit apps on a 32 bit os which can not possibly happen.
-
- Posts: 313
- Joined: Wed Mar 08, 2006 8:18 pm
Re: 64 bits cpus
I just had to comment on this absolute statement... (I'm in 'the mood' today....)bob wrote:I do not see how. 64 bit mode and 32 bit mode are _not_ compatible. If the OS will run a 64 bit application, it is a 64 bit OS. I agree that a 64 bit OS can run a 32 bit application, but not the other way around.
BTW are you talking "snow leopard"? That's a 64 bit OS, through and through. 32 bit OS is _not_ going to enable 64 bit features, They can't, for obvious reasons.
Remember Win32s...???
It added 32 bit functionality to plain, ordinary 16 bit Windows 3.11
You could also talk about DOS's old DPMI & VCPI modes. 32 bit extensions to 16 bit DOS.
Neither DOS nor Win 3.x could be called 32 bit OS's, by any stretch of the imagination. But yet both had the ability to run 32 bit code.
Technically, the same could be said for a 32 bit OS running 64 bit code.
I'm not saying that is currently how OS's work, or that it should be done, etc. etc.
You just made a blanket statement and I was in the mood to disagree with someone. (shrug)
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: 64 bits cpus
Again, this is irrelevant. The issue is that the 64 bit processors operate in a different mode, and you need a 64-bit aware kernel to make the processor function. Normal X86 uses a 2-level page table for virtual-to-real translations, 64 bit uses a 4-level page table. A 32 bit OS is simply going to run in 32 bit mode to use the page table approach it is aware of. If it becomes aware of the 64 bit format, then it is no longer a 32 bit OS.Carey wrote:I just had to comment on this absolute statement... (I'm in 'the mood' today....)bob wrote:I do not see how. 64 bit mode and 32 bit mode are _not_ compatible. If the OS will run a 64 bit application, it is a 64 bit OS. I agree that a 64 bit OS can run a 32 bit application, but not the other way around.
BTW are you talking "snow leopard"? That's a 64 bit OS, through and through. 32 bit OS is _not_ going to enable 64 bit features, They can't, for obvious reasons.
Remember Win32s...???
Also note that there are no additional registers or a different page table format for those older platforms, while the new 64 bit stuff changes everything.
It added 32 bit functionality to plain, ordinary 16 bit Windows 3.11
You could also talk about DOS's old DPMI & VCPI modes. 32 bit extensions to 16 bit DOS.
Neither DOS nor Win 3.x could be called 32 bit OS's, by any stretch of the imagination. But yet both had the ability to run 32 bit code.
Technically, the same could be said for a 32 bit OS running 64 bit code.
I'm not saying that is currently how OS's work, or that it should be done, etc. etc.
You just made a blanket statement and I was in the mood to disagree with someone. (shrug)

My blanket statement stands. If an OS only knows 32 bit stuff, 64 bit mode will _never_ work. If the OS is extended so that it understands the new 64 bit stuff, then you would not call that a 32 bit OS any longer. Or at least I would not.
Re: 64 bits cpus
I'd agree with you, except that OS X by default boots into a 32 bit kernel (you can make it boot into a 64 bit kernel, but you have to do this explicitly) and runs 64 bit applications just fine (experimentally verified by compiling code in 64 bit mode).bob wrote: Again, this is irrelevant. The issue is that the 64 bit processors operate in a different mode, and you need a 64-bit aware kernel to make the processor function. Normal X86 uses a 2-level page table for virtual-to-real translations, 64 bit uses a 4-level page table. A 32 bit OS is simply going to run in 32 bit mode to use the page table approach it is aware of. If it becomes aware of the 64 bit format, then it is no longer a 32 bit OS.
I have no idea what Apple do to make this work. Maybe what they're doing is running key aspects of the kernel in 64 bit and run the main part of the kernel in 32 bit, translating system calls into the 64 bit kernel into equivalent calls into the 32 bit kernel.
That, or the system really does boot into 64 bit but Apple have decided for obscure reasons to tell everyone that it is still booting in 32 bit mode...