Re:ISO C became unusable for operating systems development
by pjc50 on Friday January 21, 2022 @11:07AM
(#30025440)
ARM "Jazelle" was capable of this, but it required a C implementation of a JVM. Any GC-dependant language has this problem.
Re:ISO C became unusable for operating systems development
by pjmlp on Friday January 21, 2022 @05:58PM
(#30031052)
Please find the C code here,
https://people.inf.ethz.ch/wirth/ProjectOberon/Sources/Kerne...
Re:ISO C became unusable for operating systems development
by bluGill on Friday January 21, 2022 @10:36AM
(#30024959)
True, you can design a CPU for anything. However a OS that depends on such a CPU is not portable to anything else, and can't easily run most programs that people depend on (emulators are possible, but not easy). Also most CPU advances haven't gone into such a thing and it is tricky to apply those advances while also providing what the language needs. None of this is impossible, but it makes such CPUs in todays world of questionable value.
Note that you can port any OS written in C to such a CPU with "just" a new compiler backend and a few drivers. Your OS won't take advantage of the features the CPU provides, but it will work.
Re:ISO C became unusable for operating systems development
by 3836293648 on Friday January 21, 2022 @01:12PM
(#30027526)
Eh, can you really properly implement a CPU without interrupts? I wouldn't categorise anything in that space as a driver
Re:ISO C became unusable for operating systems development
by bluGill on Friday January 21, 2022 @04:43PM
(#30030392)
Good point. I assumed there was some form of interrupt system, but not all CPUs need to have it, and lacking that your OS choices will be limited.
Re:ISO C became unusable for operating systems development
by gpderetta on Friday January 21, 2022 @10:37AM
(#30024976)
running java bytecode natively is neither necessary nor sufficient as you can compile java to any other native ISA, but you do still a relatively heavy runtime for GC.
Having said that, there have been OSs written in languages with heavy runtimes, even GC.
Maybe I'm wrong, but I know that there exist CPUs made specifically to natively execute Java bytecode, so in reality if the hardware has a baked-in language interpretation it would be actually possible to write an OS completely in Java