I was just wondering if microsoft has to wait until the 128-bit procssor comes out before they work on a 128-bit OS, or if they can work on it ahead of time.
I don't know much about OS's but, I'd love any information you can give me, thank you :)
Short answer: You can't run it on the native hardware, but you can use an emulation layer to simulate the newer hardware.
Longer answer:
The situation is extremely similar to trying to run a 64-bit OS or application on a 32-bit processor - it's just not possible to run natively where bits(processor) < bits(OS). Basically, 32-bit processors can't understand 64-bit instructions, and thus can't run 64-bit OS or applications. This is covered in this related SO answer:
...the difference between traditional x86 processor and x86-64 is not only in the pointer size, but also in the instruction set. While the pointers are larger and consume more memory (8 bytes instead of 4) it is compensated by larger register set...
Is there any way to execute 64-bit programs on a 32-bit computer? was asked on StackOverflow back in 2011, and has similar "No" answers, though this superuser answer answers it with more detailed information:
For all intents and purposes, it is essentially impossible to execute a 64-bit instruction on 32-bit hardware, and while 64-bit Windows may have some 32-bit files, the main parts are 64-bit, so it won’t even boot.
There are several other answers on superuser.com that cover similar ground, such as this, this, and this, though this site has a decent coverage of the underlying architectural reasons along with a pretty picture that helps explain it:
To run a 64-bit operating system you need support from the lower level: the 64-bit CPU.
To run a 64-bit application you need support from all lower levels: the 64-bit OS and the 64-bit CPU.
This simplification will be enough for us to look what happens when we mix the 32-bit and 64-bit parts. But if you want to understand the issue more deeply then you will also need to consider the hardware that supports the CPU and the device drivers that allow the OS and the applications to interface with the system hardware.
I hope you can see from these examples why it's similarly not possible to natively run a theoretical 128-bit OS on top of 64-bit processor architecture - the underlying system wouldn't be able to understand the instructions.
Now, with all that said, there is a way to run it. If you have a 64-bit processor, you can write/use a 64-bit OS that basically emulates, or pretends to be 128-bit hardware for another OS to run on. In the above diagram, this would be a layer between the hardware processor and the OS - from the 128-bit OS's perspective, it sees 128-bit hardware, even though it's actually provided by software emulation.
Now, since it's emulation, the performance is likely to be... "not good". As mentioned in the comments, "if one tried to simulate a newer 128-bit machine, software would stroll rather leisurely, as opposed to running".
Given the performance limitations, this emulation would primarily be useful for the scenario you described in the question - development of a new OS before the hardware is ready, or perhaps to play around or prove out a concept. Here is an example of running a 32-bit OS on an 8-bit processor.
To get the world's slowest Linux Computer running, he had to write an ARMv5 emulator which supports a 32bit processor and MMU.
Just how slow is it? "It takes about 2 hours to boot to bash prompt ('init=/bin/bash' kernel command line). Then 4 more hours to boot up the entire Ubuntu ('exec init' and then login). Starting X takes a lot longer.
As a point of interest: going in the reverse direction (emulating older hardware instead of newer) can be quite fast. As an example, software emulators for old video game consoles can essentially emulate the console hardware on your PC, but run it many times faster due to the huge hardware improvements since the console hardware was originally released.
So yeah, it's possible, but only through emulation - not running directly on the hardware.
Long answer: Yes
Linux is designed for at least a 32-bit CPU, but here is it running on a 8-bit CPU. http://www.extremetech.com/extreme/124287-the-worlds-slowest-linux-pc
Basically with emulation, you can simulate future processors. The performance is going to be poor, but it can be done. Unless you were on the team developing the new processor, there would be little point except for proof of concept and early stage testing.
Also, without emulation, a C compiler can be modified to support larger int and long variables by increasing the instructions to chain 2 64 bit values into 128 bit value, or four 64 bit values into a 256 bit value. So, ignoring memory limitations, the code designed for a 128 bit processor could be run on a 64 bit processor. This would not have as great of a performance penalty as emulating, and would make more sense for testing portions of a new OS such as a new large scale file system type designed for future processors on current processors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With