Ethin wrote:
Sorry but I have to disagree with you very strongly about this. Its actually a very good thing that Intel/AMD optimize their CPUs to be fastest with compiler-generated code. Because 99.99999999 percent of programmers don't write assembly. I'm quite positive that less than 30 percent of them even use intrinsic functions. Assembly is only used in very very specific circumstances where doing what you want to do is impossible in a higher-level language, and the reasons to use it are becoming fewer and fewer every year. I wouldn't be surprised if in 5-10 years you'll be able to completely write an OS in a high-level language without knowing any assembly at all, or only have to write a few tiny functions in it (or if your doing some ABI weirdness).
Sure, but I see no reason to write a new OS that cannot exploit an interesting design idea. With ready-made memory models, compilers and the Unix "standard", all you can do is to write yet another Unix-clone, which probably will be poor and uninteresting. I don't much fancy writing that kind of poor stuff. I can use my time in better ways.
Originally, Intel did a great work with the 386 standard, and provided an enviroment that can be used to isolate software. Then the big OSes decided they wanted to use a flat memory model, linking the kernel with code & data closely packed and a nightmare in poor software isolation. The biggest reason they did so was because C compilers couldn't handle segmentation in a efficient way. So, the Unix standard and C compilers made a great invention regress back to a flat memory model, and then AMD invented the 64-bit flat memory model with no segmentation support.
CPU manufacturers decided they needed to optimize multilevel paging and could do segment loads in microcode.
In fact, the Unix and C standard will crush any new invention in the CPU area aimed to solve the issue of software isolation. Simply because this is incompatible with those standards.
I once had an idea that the upper 16-bit of the long mode address space could also be used for software isolation, however GCC and the GNU linker couldn't handle it.